image.clear () - setting the pixel transparency value.

How to get transparent pixels over the entire surface of an Image object?

for example :

  1. Draws a Sprite object on the Image object (Sprite is small and also has transparent pixels), and Image finally on the screen.
  2. in the next frame I clean the Image and move the Sprite, redraw it on the Image.

Now the two frames are connected because the cleanup function did not delete what is on the Image object.

image.clear ('rgba (0,0,0,0)') behaves like image.fillRect (x, y, size.x, sizey, 'rgba (0,0,0,0'))

In my opinion, the image.clear () function should unconditionally clear the entire object and set the colors as it is called when it is called.

https://microstudio.dev/i/Loginus/imagetransparent/