mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
text: update comments
This commit is contained in:
parent
2e4d4df8ec
commit
b9b78b5b44
@ -63,7 +63,6 @@ func drawGlyph(dst *ebiten.Image, face font.Face, r rune, img *ebiten.Image, dx,
|
|||||||
|
|
||||||
// Adjust the position to the integers.
|
// Adjust the position to the integers.
|
||||||
// The current glyph images assume that they are rendered on integer positions so far.
|
// The current glyph images assume that they are rendered on integer positions so far.
|
||||||
// The nearest filter cannot handle float positions.
|
|
||||||
op2.GeoM.Translate(math.Floor(fixed26_6ToFloat64(dx+b.Min.X)), math.Floor(fixed26_6ToFloat64(dy+b.Min.Y)))
|
op2.GeoM.Translate(math.Floor(fixed26_6ToFloat64(dx+b.Min.X)), math.Floor(fixed26_6ToFloat64(dy+b.Min.Y)))
|
||||||
if op != nil {
|
if op != nil {
|
||||||
op2.GeoM.Concat(op.GeoM)
|
op2.GeoM.Concat(op.GeoM)
|
||||||
@ -132,7 +131,6 @@ func getGlyphImage(face font.Face, r rune) *ebiten.Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Adjust the dot position so that the glyph image can be rendered on integer positions.
|
// Adjust the dot position so that the glyph image can be rendered on integer positions.
|
||||||
// The nearest filter cannot handle float positions.
|
|
||||||
x, y := -b.Min.X, -b.Min.Y
|
x, y := -b.Min.X, -b.Min.Y
|
||||||
x, y = fixed.I(x.Ceil()), fixed.I(y.Ceil())
|
x, y = fixed.I(x.Ceil()), fixed.I(y.Ceil())
|
||||||
d.Dot = fixed.Point26_6{X: x, Y: y}
|
d.Dot = fixed.Point26_6{X: x, Y: y}
|
||||||
@ -441,7 +439,6 @@ func AppendGlyphs(glyphs []Glyph, face font.Face, text string) []Glyph {
|
|||||||
b := getGlyphBounds(face, r)
|
b := getGlyphBounds(face, r)
|
||||||
// Adjust the position to the integers.
|
// Adjust the position to the integers.
|
||||||
// The current glyph images assume that they are rendered on integer positions so far.
|
// The current glyph images assume that they are rendered on integer positions so far.
|
||||||
// The nearest filter cannot handle float positions.
|
|
||||||
glyphs = append(glyphs, Glyph{
|
glyphs = append(glyphs, Glyph{
|
||||||
Rune: r,
|
Rune: r,
|
||||||
Image: img,
|
Image: img,
|
||||||
|
Loading…
Reference in New Issue
Block a user