mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
examples/font: Simplify
This commit is contained in:
parent
aa811b5ce5
commit
348e11ac1b
@ -76,12 +76,11 @@ func parseFont() error {
|
|||||||
Hinting: font.HintingFull,
|
Hinting: font.HintingFull,
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
dy := size * dpi / 72
|
y := size
|
||||||
y := dy
|
|
||||||
for _, s := range text {
|
for _, s := range text {
|
||||||
d.Dot = fixed.P(0, y)
|
d.Dot = fixed.P(0, y)
|
||||||
d.DrawString(s)
|
d.DrawString(s)
|
||||||
y += dy
|
y += size
|
||||||
}
|
}
|
||||||
return textImage.ReplacePixels(dst.Pix)
|
return textImage.ReplacePixels(dst.Pix)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user