From 562f5e19c992bd975c6e14042353f45530df211b Mon Sep 17 00:00:00 2001 From: faiface <faiface@ksp.sk> Date: Sat, 18 Mar 2017 20:18:44 +0100 Subject: [PATCH] fix bug in IMDraw.Push --- graphics.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/graphics.go b/graphics.go index 0a6191b..28f7999 100644 --- a/graphics.go +++ b/graphics.go @@ -157,14 +157,15 @@ func (imd *IMDraw) Draw(t Target) { // Push adds some points to the IM queue. All Pushed points will have the same properties except for // the position. func (imd *IMDraw) Push(pts ...Vec) { + point := imd.opts + point.col = imd.mask.Mul(point.col) for _, pt := range pts { - imd.pushPt(pt, imd.opts) + imd.pushPt(imd.matrix.Project(pt), point) } } func (imd *IMDraw) pushPt(pos Vec, pt point) { - pt.pos = imd.matrix.Project(pos) - pt.col = imd.mask.Mul(pt.col) + pt.pos = pos imd.points = append(imd.points, pt) } -- GitLab