text: Refactoring

This commit is contained in:
Hajime Hoshi 2021-11-12 00:17:51 +09:00
parent 1f7e7e2816
commit 3eb444f211

View File

@ -58,9 +58,9 @@ func drawGlyph(dst *ebiten.Image, face font.Face, r rune, img *ebiten.Image, dx,
op2 := &ebiten.DrawImageOptions{}
if op != nil {
*op2 = *op
op2.GeoM.Reset()
}
op2.GeoM.Reset()
op2.GeoM.Translate(float64((dx+b.Min.X)>>6), float64((dy+b.Min.Y)>>6))
op2.GeoM.Translate(math.Floor(fixed26_6ToFloat64(dx+b.Min.X)), math.Floor(fixed26_6ToFloat64(dy+b.Min.Y)))
if op != nil {
op2.GeoM.Concat(op.GeoM)
}