From 69923d9438619fd810d70f12315dc0b10aa45723 Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Fri, 22 Apr 2022 11:49:17 +0200 Subject: [PATCH] fixed draw clipping on subimages --- context.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/context.go b/context.go index 1ddb09f..25c0859 100644 --- a/context.go +++ b/context.go @@ -418,6 +418,7 @@ func (dc *Context) stroke(painter raster.Painter) { r := dc.rasterizer r.UseNonZeroWinding = true r.Clear() + r.Dx, r.Dy = dc.im.Bounds().Min.X, dc.im.Bounds().Min.Y r.AddStroke(path, fix(dc.lineWidth), dc.capper(), dc.joiner()) r.Rasterize(painter) } @@ -432,6 +433,7 @@ func (dc *Context) fill(painter raster.Painter) { r := dc.rasterizer r.UseNonZeroWinding = dc.fillRule == FillRuleWinding r.Clear() + r.Dx, r.Dy = dc.im.Bounds().Min.X, dc.im.Bounds().Min.Y r.AddPath(path) r.Rasterize(painter) }