Trouble With Generating Sprite?

I'm having an odd issue. I have a class that extends gfx.sprite, and for the image in it, I generate it when creating the object. I generate the image like this:

gfx.pushContext( self.img )
  gfx.setColor( gfx.kColorBlack )
  gfx.fillRect( 0, 0, 32, 32 )
  gfx.setColor( gfx.kColorWhite )
  gfx.fillRect( 5, 5, 10, 10 )
  gfx.setColor( gfx.kColorClear )
  gfx.fillRect( 20, 20, 10, 10 )
gfx.popContext()

Screen Shot 2022-05-31 at 8.33.28 PM

the issue is that "white" square becomes transparent.. I want the sprite to be opaque... filled with white. what am i forgetting?

Nevermind. I'm stupid. I had the grid drawing after the sprite render.
:man_facepalming:

4 Likes