Skip to content

Commit

Permalink
fix(shapes): [Skia] Adjust shapes path alignment given StrokeThickness
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Aug 12, 2020
1 parent ff5b867 commit a28763f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Uno.UI/UI/Xaml/Shapes/Shape.Skia.cs
Expand Up @@ -58,8 +58,7 @@ private protected void Render(Windows.UI.Composition.SkiaGeometrySource2D path,
_pathSpriteShape.Scale = new Vector2(1, 1);
}

var thicknessOffset = (float)StrokeThickness / 2.0f;
_pathSpriteShape.Offset = LayoutRound(new Vector2((float)(renderOriginX ?? 0) + thicknessOffset , (float)(renderOriginY ?? 0) + thicknessOffset));
_pathSpriteShape.Offset = LayoutRound(new Vector2((float)(renderOriginX ?? 0), (float)(renderOriginY ?? 0)));

_rectangleVisual.Shapes.Clear();
_rectangleVisual.Shapes.Add(_pathSpriteShape);
Expand Down

0 comments on commit a28763f

Please sign in to comment.