examples/text: bug fix: go-vet error

This commit is contained in:
Hajime Hoshi 2023-06-10 19:29:14 +09:00
parent 911cf0c48c
commit 7791ae3029

View File

@ -108,7 +108,7 @@ func boundString(face font.Face, str string) fixed.Rectangle26_6 {
m := face.Metrics() m := face.Metrics()
minY := -m.Ascent minY := -m.Ascent
maxY := fixed.Int26_6(len(lines)-1)*m.Height + m.Descent maxY := fixed.Int26_6(len(lines)-1)*m.Height + m.Descent
return fixed.Rectangle26_6{fixed.Point26_6{X: minX, Y: minY}, fixed.Point26_6{X: maxX, Y: maxY}} return fixed.Rectangle26_6{Min: fixed.Point26_6{X: minX, Y: minY}, Max: fixed.Point26_6{X: maxX, Y: maxY}}
} }
func fixed26_6ToFloat32(x fixed.Int26_6) float32 { func fixed26_6ToFloat32(x fixed.Int26_6) float32 {