Skip to content

Commit

Permalink
Merge pull request #117 from bhperry/revert-text-anchor-bug
Browse files Browse the repository at this point in the history
Revert "Fix text anchor position when txt.Bounds().W() != txt.Dot.X-txt.Orig.X"
  • Loading branch information
bhperry authored Aug 30, 2024
2 parents 9070c3c + 36af8f4 commit 8f8ea78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/text/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8f8ea78

Please sign in to comment.