round coordinates when filling with image mask to improve text rendering
This commit is contained in:
parent
34087abece
commit
39e9e6400b
1 changed files with 1 additions and 1 deletions
|
@ -203,7 +203,7 @@ func (b *GoGLBackend) FillImageMask(style *backendbase.FillStyle, mask *image.Al
|
||||||
var buf [16]float32
|
var buf [16]float32
|
||||||
data := buf[:0]
|
data := buf[:0]
|
||||||
for _, pt := range pts {
|
for _, pt := range pts {
|
||||||
data = append(data, float32(pt[0]), float32(pt[1]))
|
data = append(data, float32(math.Round(pt[0])), float32(math.Round(pt[1])))
|
||||||
}
|
}
|
||||||
data = append(data, 0, 0, 0, float32(th), float32(tw), float32(th), float32(tw), 0)
|
data = append(data, 0, 0, 0, float32(th), float32(tw), float32(th), float32(tw), 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue