Panel and alpha mask

Posted By: RyuMaster

Panel and alpha mask - 11/22/08 18:06

Hi! Is it possible to make such feature:

Lets say, I have large black panel on screen.

And I have other panel/image attached to mouse, like white circle (mask).

Black panel becomes transparent in place where white circle is placed, so, basically, white circle should act as alpha mask.

Do I have to render panel to bitmap and process it somehow, or maybe there is other way?

Regards,
Konstantin.
Posted By: Uhrwerk

Re: Panel and alpha mask - 11/22/08 23:53

The easiest way is to create a oversized bitmap for the black panel with a transparent circle in its center and then simply move the panel. If it is larger than the screen the user won't notice if the alpha mask is move or the panel itself.

But your idea is also possible. Have a look in the manual under bmap_blit.
Posted By: RyuMaster

Re: Panel and alpha mask - 12/18/08 13:42

Actually, I try to mimic Fallout's 2 effect. When player is behind the wall, some part of wall becomes transparent to see the player. And every wall in my game is represented by panel.

So, basically, is there some way to make some part of particular panel transparent, without involving heavy coding?
© 2024 lite-C Forums