Skip to content

Commit 68e1d79

Browse files
committed
Avoid unnecessary conversion
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
1 parent c4cdf90 commit 68e1d79

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

widget.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func drawString(img *image.RGBA, bounds image.Rectangle, ttf *truetype.Font, tex
143143
pt = image.Pt(int(xcenter), pt.Y)
144144
}
145145
if pt.Y < 0 {
146-
actheight := int(float64(fontsize) * 72.0 / float64(dev.DPI))
146+
actheight := int(fontsize * 72.0 / float64(dev.DPI))
147147
ycenter := float64(bounds.Dy()/2.0) + float64(actheight)
148148
pt = image.Pt(pt.X, bounds.Min.Y+int(ycenter))
149149
}

0 commit comments

Comments
 (0)