Fix text anchor position when txt.Bounds().W() != txt.Dot.X-txt.Orig.X
This commit is contained in:
parent
c9681cec8a
commit
3b599e70ec
|
@ -252,7 +252,7 @@ func (txt *Text) DrawColorMask(t pixel.Target, matrix pixel.Matrix, mask color.C
|
||||||
txt.dirty = true
|
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)
|
txt.mat = pixel.IM.Moved(offset).Chained(txt.mat)
|
||||||
|
|
||||||
if mask == nil {
|
if mask == nil {
|
||||||
|
|
Loading…
Reference in New Issue