Skip to content

Commit

Permalink
Use own Pen (if set) in GeometryDrawing.GetBounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Tellier committed Jun 2, 2022
1 parent 30e8b17 commit 1f7cf04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Avalonia.Visuals/Media/GeometryDrawing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public override void Draw(DrawingContext context)

public override Rect GetBounds()
{
return Geometry?.GetRenderBounds(s_boundsPen) ?? Rect.Empty;
IPen pen = Pen ?? s_boundsPen;
return Geometry?.GetRenderBounds(pen) ?? Rect.Empty;
}
}
}

0 comments on commit 1f7cf04

Please sign in to comment.