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:
Родитель
a112ced109
Коммит
d7533b44f9
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче