Hi!
On PureBasic I'm using TransparentSpriteColor to set a color as transparent (the background color of all my sprites). But this command is not present on SpiderBasic (I'm trying to create a code base that compiles on both PureBasic and SpiderBasic). How could I implement this behavior on SpiderBasic?
Thank you all!
TransparentSpriteColor?
-
- Posts: 26
- Joined: Fri Jan 10, 2020 12:30 pm
TransparentSpriteColor?
You can check my games at:
https://ricardo-sdl.itch.io/
https://ricardo-sdl.itch.io/
Re: TransparentSpriteColor?
There is DisplayTransparentSprite which use alphachannel (png 32bit)
Christos
Re: TransparentSpriteColor?
Convert your Sprites to PNG with transparency layer and use those instead.
Both PB and SB will load the transparent sprite with LoadSprite() and the #PB_Sprite_AlphaBlending flag and display with DisplayTransparentSprite().
You also get the cleanest and smoothest edges compared to keying out a single color with TransparentSpriteColor()
Both PB and SB will load the transparent sprite with LoadSprite() and the #PB_Sprite_AlphaBlending flag and display with DisplayTransparentSprite().
You also get the cleanest and smoothest edges compared to keying out a single color with TransparentSpriteColor()
-
- Posts: 26
- Joined: Fri Jan 10, 2020 12:30 pm
Re: TransparentSpriteColor?
Thanks! That's the way to go!
You can check my games at:
https://ricardo-sdl.itch.io/
https://ricardo-sdl.itch.io/