ScalingCanvas: DrawPath, FillPath, and ClipPath respect Y scale

This commit fixes a bug described by #302 where DrawPath, FillPath, and ClipPath only considered the X scale factor. This fix resolves this issue, as demonstrated by the new ScaleCanvas GraphicsTester scenario.
This commit is contained in:
Scott W Harden 2022-02-05 11:53:27 -05:00
Родитель a112ced109
Коммит d7533b44f9
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -175,19 +175,19 @@ namespace Microsoft.Maui.Graphics
public void DrawPath(PathF path)
{
var scaledPath = path.AsScaledPath(_scaleX);
var scaledPath = path.AsScaledPath(_scaleX, _scaleY);
_canvas.DrawPath(scaledPath);
}
public void FillPath(PathF path, WindingMode windingMode)
{
var scaledPath = path.AsScaledPath(_scaleX);
var scaledPath = path.AsScaledPath(_scaleX, _scaleY);
_canvas.FillPath(scaledPath, windingMode);
}
public void ClipPath(PathF path, WindingMode windingMode = WindingMode.NonZero)
{
var scaledPath = path.AsScaledPath(_scaleX);
var scaledPath = path.AsScaledPath(_scaleX, _scaleY);
_canvas.ClipPath(scaledPath, windingMode);
}