From 23cf3c9a64dc4ca2f204e079f793cb184249d777 Mon Sep 17 00:00:00 2001 From: Maksim Kochkin Date: Sun, 29 Nov 2015 16:00:23 +0300 Subject: [PATCH] Change alpha max value from 1<<32-1 to 1<<16-1 Looks like since https://github.com/golang/freetype/commit/8a4428169df5c9ec333fbda61dca6b830cb47d66 you forget to change this in MonochromePainter --- raster/paint.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raster/paint.go b/raster/paint.go index 185d36a..652256c 100644 --- a/raster/paint.go +++ b/raster/paint.go @@ -197,7 +197,7 @@ func (m *MonochromePainter) Paint(ss []Span, done bool) { if m.y == s.Y && m.x1 == s.X0 { m.x1 = s.X1 } else { - ss[j] = Span{m.y, m.x0, m.x1, 1<<32 - 1} + ss[j] = Span{m.y, m.x0, m.x1, 1<<16 - 1} j++ m.y, m.x0, m.x1 = s.Y, s.X0, s.X1 } @@ -205,7 +205,7 @@ func (m *MonochromePainter) Paint(ss []Span, done bool) { } if done { // Flush the accumulated Span. - finalSpan := Span{m.y, m.x0, m.x1, 1<<32 - 1} + finalSpan := Span{m.y, m.x0, m.x1, 1<<16 - 1} if j < len(ss) { ss[j] = finalSpan j++