LordFire
2002.04.29, 10:47 AM
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?