From cc30f39e114c923a5fc0ca12e8eef09cea6e6c35 Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Fri, 22 Apr 2022 11:57:30 +0200 Subject: [PATCH] fixed drawclipping when drawing text on subimages --- context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context.go b/context.go index 25c0859..7f31e4e 100644 --- a/context.go +++ b/context.go @@ -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)