From b864adcd210036f33d5536123ddc84d1d149e29e Mon Sep 17 00:00:00 2001 From: Laurent Le Goff Date: Mon, 30 Jul 2012 12:09:00 +0200 Subject: [PATCH] Apply patch from issue 26, thanks to Ethan Burns --- draw2d/image.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/draw2d/image.go b/draw2d/image.go index eca4830..6a6dbd4 100644 --- a/draw2d/image.go +++ b/draw2d/image.go @@ -45,7 +45,7 @@ func NewGraphicContext(img draw.Image) *ImageGraphicContext { width, height := img.Bounds().Dx(), img.Bounds().Dy() dpi := 92 ftContext := freetype.NewContext() - ftContext.SetDPI(dpi) + ftContext.SetDPI(float64(dpi)) ftContext.SetClip(img.Bounds()) ftContext.SetDst(img) gc := &ImageGraphicContext{ @@ -65,7 +65,7 @@ func NewGraphicContextWithPainter(img draw.Image, painter Painter) *ImageGraphic width, height := img.Bounds().Dx(), img.Bounds().Dy() dpi := 92 ftContext := freetype.NewContext() - ftContext.SetDPI(dpi) + ftContext.SetDPI(float64(dpi)) ftContext.SetClip(img.Bounds()) ftContext.SetDst(img) gc := &ImageGraphicContext{ @@ -82,7 +82,7 @@ func NewGraphicContextWithPainter(img draw.Image, painter Painter) *ImageGraphic func (gc *ImageGraphicContext) SetDPI(dpi int) { gc.DPI = dpi - gc.freetype.SetDPI(dpi) + gc.freetype.SetDPI(float64(dpi)) } func (gc *ImageGraphicContext) GetDPI() int {