From d2d1f03c32421f241a2b30ae87afb23feb12085d Mon Sep 17 00:00:00 2001 From: "Alex R. Delp" Date: Sat, 9 May 2020 12:46:09 -0700 Subject: [PATCH] Add a clarifying comment in imdraw push --- imdraw/imdraw.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imdraw/imdraw.go b/imdraw/imdraw.go index e616c39..9de21c9 100644 --- a/imdraw/imdraw.go +++ b/imdraw/imdraw.go @@ -128,7 +128,9 @@ func (imd *IMDraw) Draw(t pixel.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 ...pixel.Vec) { + //Assert that Color is of type pixel.RGBA, if _, ok := imd.Color.(pixel.RGBA); !ok { + //otherwise cast it imd.Color = pixel.ToRGBA(imd.Color) } opts := point{