I need some help with masks. I want to make a sprite with transperent areas around it. I know how to make the mask, but I don't know how to make the picture transperent when the prgram is running. Please help:)
Printable View
I need some help with masks. I want to make a sprite with transperent areas around it. I know how to make the mask, but I don't know how to make the picture transperent when the prgram is running. Please help:)
It's like this (simple):
- Draw one picture (BMP) with a black (rgb(0,0,0)) background.
- With the same pic you color all the not(BLACK) pixels
in BLACK, and the original Background black, turn it to
WHITE (rgb(255,255,255)).
- When you have those two pics draw them with BitBlt like this:
BitBlt TheOneWithBlackBack.hdc,...,vbSrcAnd
BitBlt TheOneWithWhiteBack.hdc,...,vbSrcInvert
When the black & the white backgrounds gets into a transparent back.
That's all.
Arie. (mag.up.co.il)
There's a full bitblt tutorial here:
http://vbden.tripod.com/articles/invmask.htm