REALbasic: Transparent Picture/Sprite
g'day
I'm having problems trying to make a transparent sprite in RB4. The code I'm using is pretty much as follows. I want to have a image of a 256 grey colour cloud with a 256 grey colour mask to it looks transparent.
// create the picture
clonecloud = newpicture(128,128,32)
// copy cloud image in to picture
clonecloud.Graphics.DrawPicture cloud,0,0
// copy cloud mask in to mask of picture
clonecloud.Mask.Graphics.DrawPicture cloudmask,0,0
// make the sky sprite
sky = spriteSurface1.NewSprite(clonecloud,64,64) // add the cloud sprite
// update so we can see the sprite
window1.spriteSurface1.update
The above, doesn't work, can anyone see a problem? Or am I missing something?
I'm having problems trying to make a transparent sprite in RB4. The code I'm using is pretty much as follows. I want to have a image of a 256 grey colour cloud with a 256 grey colour mask to it looks transparent.
// create the picture
clonecloud = newpicture(128,128,32)
// copy cloud image in to picture
clonecloud.Graphics.DrawPicture cloud,0,0
// copy cloud mask in to mask of picture
clonecloud.Mask.Graphics.DrawPicture cloudmask,0,0
// make the sky sprite
sky = spriteSurface1.NewSprite(clonecloud,64,64) // add the cloud sprite
// update so we can see the sprite
window1.spriteSurface1.update
The above, doesn't work, can anyone see a problem? Or am I missing something?
8 bit masks don't work in RB.
Never did.
Try reading the online help file on sprites.
If you want 8 bit masks try using Rb3D...
it will give you full translucency etc.
Adn its easy to use...
Never did.
Try reading the online help file on sprites.
If you want 8 bit masks try using Rb3D...
it will give you full translucency etc.
Adn its easy to use...
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| antialiased realbasic???? | hertzcastle | 1 | 2,330 |
Mar 24, 2008 11:02 AM Last Post: SethWillits |
|
| Is there Any one good on RealBasic? | dicksonwoo | 1 | 2,027 |
Aug 30, 2007 05:27 AM Last Post: ERaZer |
|

