Fix text anchor position when txt.Bounds().W() != txt.Dot.X-txt.Orig.X

This commit is contained in:
Nathanael Jourdane 2020-08-22 15:31:07 +02:00
parent c9681cec8a
commit 3b599e70ec
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ func (txt *Text) DrawColorMask(t pixel.Target, matrix pixel.Matrix, mask color.C
txt.dirty = true
}
offset := txt.Bounds().AnchorPos(txt.anchor)
offset := txt.Orig.Sub(txt.Bounds().Max.Add(txt.Bounds().AnchorPos(txt.anchor.Opposite())))
txt.mat = pixel.IM.Moved(offset).Chained(txt.mat)
if mask == nil {