PDA

Click to See Complete Forum and Search --> : BitBlt with a mask


agent
Nov 10th, 2000, 01:21 AM
I'm looking for a way to use BitBlt (and eventually StretchBlt) with a 256 color greyscale mask. I'd like to composite two images together like so:

Layer2 = Image (With semi-transparency, derived from mask)
Layer1 = Background

I figured, just set the picture to whatever background, and BitBlt layer2 on top of layer1. I have a greyscale image i'd like to use to describe different amounts of transparency for each pixel.

btw, I've heard that this is easy to do in Win2k. Unfortunately, my end user target is not win2k or win me.

/\/\isanThr0p
Nov 10th, 2000, 01:40 AM
Hm Good and Bad news

What you want to do is possible, but not with BitBlt. Go to http://www.ur.co.nz in the tutorial section is a real good and fast sample how to do this.

Mage33
Nov 10th, 2000, 03:33 PM
Well, I'm just starting to venture into game programming in VB and I was wondering what exactly bitblt is and what it does... can anyone tell me?

schnarf283
Nov 10th, 2000, 04:19 PM
BitBlt copies a chunk of graphics from one place to another.

hankshlump
Nov 21st, 2000, 02:33 PM
i went to that place got that crap and well I DON'T UNDERSTAND IT
i have the following

picSprite - the sprite
picMask - the mask
picMain - the main picture
picBuff - the buffer for doing work
picTiled - picture of the background after it has been tiled onto the buffer to save time loading it later

what i need is when i click the main picture it BitBlt's the sprite/mask onto the buffer and then transfers it to the main picture

CAN ANYBODY HELP ME