seems to duplicate setColor()

Currently running 2.4.2 on Windows 11.

Attempting to create some fun animation effects by conditionally cleaning certain sprites on screen, however when attempting to run a clear against a single sprite, all it appears to do is set the sprites color to the colour defined by it's output.

Here is the scene if I'm using

Now if I comment out gfx.clear() and replace with:

My expectation would be that all other sprites onscreen will fail to clear, but my horse sprite will clear like the global function, using the background color.

This will fail however requesting a color value to be added to the image:clear() function.

Here it is with kColorWhite:

and here with kColorClear:

This appears to currently perform the same function as setColor and is not overwritten by the next draw function called.

OK so in this case it seems I was misinterpretting what the image:clear() function was doing.

I was assuming that it only wrote the single instance of color change at time of function run, and did not think it would retain the mask on the next draw.

1 Like