Add a clarifying comment in imdraw push

This commit is contained in:
Alex R. Delp 2020-05-09 12:46:09 -07:00
parent 6a71f07d12
commit d2d1f03c32
1 changed files with 2 additions and 0 deletions

View File

@ -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{