fixed draw clipping on subimages

This commit is contained in:
Timon Ringwald 2022-04-22 11:49:17 +02:00
parent 2755d666d6
commit 69923d9438

View File

@ -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)
}