From be45f7ad718075cbe1792a9c97c39aa1a57bfd21 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sun, 12 Mar 2023 01:23:20 -0500 Subject: [PATCH] Fixed some artist bugs --- artist/shapes/ellipse.go | 2 +- artist/shapes/rectangle.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/artist/shapes/ellipse.go b/artist/shapes/ellipse.go index c750e6f..c30041d 100644 --- a/artist/shapes/ellipse.go +++ b/artist/shapes/ellipse.go @@ -68,7 +68,7 @@ func StrokeEllipse ( }, radii: image.Pt(drawBounds.Dx() / 2, drawBounds.Dy() / 2), } - context.center = bounds.Min.Add(context.radii) + context.center = drawBounds.Min.Add(context.radii) context.plotEllipse() } diff --git a/artist/shapes/rectangle.go b/artist/shapes/rectangle.go index b52ae68..968e00c 100644 --- a/artist/shapes/rectangle.go +++ b/artist/shapes/rectangle.go @@ -49,7 +49,7 @@ func StrokeRectangle ( if insetBounds.Empty() { return FillRectangle(destination, source, bounds) } - return FillRectangleShatter(destination, source, insetBounds) + return FillRectangleShatter(destination, source, bounds, insetBounds) } // FillRectangleShatter is like FillRectangle, but it does not draw in areas