REALbasic: Transparent Picture/Sprite

Post: #1

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

The above, doesn't work, can anyone see a problem? Or am I missing something?
Quote this message in a reply
Posts: 110
Joined: 2002.04
Post: #2
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...

- Mac Lead ZeniMax Online Studios
- Owner Plaid World Studios
- Resume:
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  antialiased realbasic???? hertzcastle 1 3,633 Mar 24, 2008 11:02 AM
Last Post: SethWillits
  Is there Any one good on RealBasic? dicksonwoo 1 3,472 Aug 30, 2007 05:27 AM
Last Post: ERaZer