Skip to content

Commit

Permalink
Fix text anchor position when txt.Bounds().W() != txt.Dot.X-txt.Orig.X
Browse files Browse the repository at this point in the history
  • Loading branch information
roipoussiere committed Aug 22, 2020
1 parent c9681ce commit 3b599e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion text/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3b599e7

Please sign in to comment.