fixed drawclipping when drawing text on subimages

This commit is contained in:
Timon Ringwald 2022-04-22 11:57:30 +02:00
parent 69923d9438
commit cc30f39e11

View File

@ -756,7 +756,7 @@ func (dc *Context) DrawStringAnchored(s string, x, y, ax, ay float64) {
x -= ax * w
y += ay * h
if dc.mask == nil {
dc.drawString(dc.im, s, x, y)
dc.drawString(dc.im, s, x+float64(dc.im.Bounds().Min.X), y+float64(dc.im.Bounds().Min.Y))
} else {
im := image.NewRGBA(image.Rect(0, 0, dc.width, dc.height))
dc.drawString(im, s, x, y)