|
-
Jan 26th, 2009, 01:26 PM
#1
Thread Starter
Lively Member
Using BitBlt to overlay images
Hi,
I've got images of a oval button and an oval mask (white oval on a black background). I've also got a form with a background image. I'm wanting to cut the image of the button out using the mask and put it on the forms background image.
I believe that BitBlt is the best of of doing it (i.e. store the button image and mask in invisible Picture Boxes and use BitBlt). Just not totally sure of how to implement it.
Has anyone got any example code or links to code/threads, that would help me out with this.
many thanks
Paul
-
Jan 26th, 2009, 02:19 PM
#2
Re: Using BitBlt to overlay images
Are you saying that the end result should be an oval shape with the form's bkg image drawn within the oval? If so, you mentioned the mask is white oval over black bkg. Does the non-mask have a white bkg?
-
Jan 26th, 2009, 02:31 PM
#3
Thread Starter
Lively Member
Re: Using BitBlt to overlay images
The end result should be the forms background image with the oval button on top. At the moment the mask is a white oval on a black background, but I can easily invert this if I need to. The forms background is blue and the oval button image is on black.
-
Jan 26th, 2009, 02:36 PM
#4
Re: Using BitBlt to overlay images
Mask is white on black bkg and non-mask is whatever on white bkg? Ok, I think this is what you want if I understand you correctly. Let us know.
Blit the mask first using the ROP vbSrcPaint
Blit non-mask using ROP vbSrcAnd
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
|