Android Question Is there a way to set a color transparent ?

semar

Active Member
Licensed User
Hi all,

let's say I have some animated sprites with different coloured backgrounds, which should be rendered as transparent.

Is there a way, in B4A/B4X to render a certain color of an image as transparent ?

For instance, if I have an animated sprite where the pink color should not be rendered, how can I do that ?

In other terms, is there a command like SetMaskColor(BitmapImage, r,g,b) ?

Thanks in advance,
Sergio
 

semar

Active Member
Licensed User
I have not at the moment the sprites I mean, but any sprite would suffice for your request.
I have prepared a sprite from your Asteroids example code. Let's say, the pink color should be transparent.
I need something I could use also for a single frame sprite.

Regards,
Sergio
 

Attachments

Top