Skip to content Skip to sidebar Skip to footer

Circle Of Light Ontop Of Bitmap - Android

I'm trying to create a torch item in my game, that will light bitmaps\bitmap that are behind him in a circle shape (for example torch in terraria), so basically I'm trying to under

Solution 1:

There many ways to achieve this. One (fast) is to use the HSL color space and increase the L parameter foe example. I don't know if you are working with RGB if there is an easy way around it.

I guess since you probably wont want to check every pixel in the circle you may need to add a second circle semi-opaque for example which will make the calculation easier for you.


Solution 2:

You can simply use a transparent PNG sprite and draw it as a bitmap in your canvas at desidered position.

More info about how-to-do can be found here and here.


Post a Comment for "Circle Of Light Ontop Of Bitmap - Android"