From 36af8f43092b834d915a9061c96e12d39e3cd6c9 Mon Sep 17 00:00:00 2001 From: Ben Perry Date: Fri, 30 Aug 2024 17:11:48 -0500 Subject: [PATCH] Revert "Fix text anchor position when txt.Bounds().W() != txt.Dot.X-txt.Orig.X" This reverts commit 3b599e70ec9947a7942791a8f82cad766dd165f2. --- ext/text/text.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/text/text.go b/ext/text/text.go index 8481084..f4c4f6d 100644 --- a/ext/text/text.go +++ b/ext/text/text.go @@ -258,7 +258,7 @@ func (txt *Text) DrawColorMask(t pixel.Target, matrix pixel.Matrix, mask color.C txt.dirty = true } - offset := txt.Orig.Sub(txt.Bounds().Max.Add(txt.Bounds().AnchorPos(txt.anchor.Opposite()))) + offset := txt.Bounds().AnchorPos(txt.anchor) txt.mat = pixel.IM.Moved(offset).Chained(txt.mat) if mask == nil {