|
-
May 5th, 2001, 08:50 PM
#1
Thread Starter
Member
Moving Images With Transparency
Hi, all...
I've recenetly started a project where I need an image whose background is transparent (using the BitBlt technique), on top of of a non-transparent image that will move up and down the screen.
Does anyone know a way to do this that is fast? I tried compositing the two images together and then drawing them to the form, but it's sooo slow (or either I wrote it really inefficient!).
If anyone has any ideas, I'd appreciate any help! I'm kinda still new at this stuff, so please go moderately slow.
- Amp
-
May 5th, 2001, 08:53 PM
#2
Good Ol' Platypus
If you need a basic-intermediate-advanced tutorial go to mine:
http://vbden.tripod.com/articles/invmask.htm
Use Bitmasks, where all white pixels are BG and all black pictures are drawn (like a silhouette), make sure the corresponding pixels in this that are white are black on the real sprite picture.
This will (hopefully) show you what you are looking for.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 5th, 2001, 09:12 PM
#3
Thread Starter
Member
Ah, that explains it a lot clearer than what I've seen so far! Thanks so much!
Now, all that's left is figure out how to put another image that can move freely up and down the screen behind the newly made transparent picture and I'll be set.
- Amp
-
May 5th, 2001, 09:19 PM
#4
Good Ol' Platypus
That's easy; just change the blitting order. Blit the background first, then the thing that moves behind, then the normal sprite. PS. you can do only the first step of ANDing the mask to make a cool shadow...
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 5th, 2001, 09:20 PM
#5
Good Ol' Platypus
Oh! You mean just a background not another image, well, use SrcCopy constant, that will blit the rectangle of the bitmap (the whole sprite), the whole background.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 6th, 2001, 08:08 AM
#6
Thread Starter
Member
Ah, thanks! It works great, and fast too! Thanks for your help!
- Amp
-
May 6th, 2001, 08:46 AM
#7
Good Ol' Platypus
No problem
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 8th, 2001, 11:34 AM
#8
PowerPoster
Awwww Sas,
You're just everyones hero!
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
May 8th, 2001, 08:16 PM
#9
Thread Starter
Member
Mine at least.
-
May 8th, 2001, 08:37 PM
#10
Good Ol' Platypus
Ain't it the truth 
So much attention
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|