Are there image masks in SDL?
Hi,
Is there a way to set an image mask in SDL, such that nothing can be drawn outside the mask?
It looks like rectangular clipping is not enough for what I am trying to draw.
Thank you very much in advance.
well if you're trying to set a color to be transparent you can use SDL_SetColorKey().
I have an example on how to use it here.
Lazy Foo's SDL tutorials
[Edited by - Lazy Foo on August 10, 2007 12:01:19 AM]
I have an example on how to use it here.
Lazy Foo's SDL tutorials
[Edited by - Lazy Foo on August 10, 2007 12:01:19 AM]
Thanks :)
Unfortunately this doesn't work, because I need to set a mask tile, and then draw both the tile and all the entities standing on this tile. I can't see how I'd do this with color keying
Any suggestions would be very welcome. Thank you :)
Unfortunately this doesn't work, because I need to set a mask tile, and then draw both the tile and all the entities standing on this tile. I can't see how I'd do this with color keying
Any suggestions would be very welcome. Thank you :)
Quote:Original post by someone2
Thanks :)
Unfortunately this doesn't work, because I need to set a mask tile, and then draw both the tile and all the entities standing on this tile. I can't see how I'd do this with color keying
Any suggestions would be very welcome. Thank you :)
Maybe I misunderstand what you said, but you can just first draw the tile and then draw the enitities standing on the tile with colorkey. Or is that not what you meant?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement