I am trying to create a freehand “drawing” layer over top of another image, allowing the user to turn it on/off as needed. I understand how to handle the actual drawing routines, but am a bit confused about how to create a transparent “picture” to draw into. My thought was that I would have two picture objects, one for the background and one for the “drawing” layer. Two thoughts on how to do this have crossed my mind, I’m just trying to get feedback on the most logical (and CPU efficient) method:
-
The canvas paint event would first draw the background picture and then (optionally) the drawing layer picture. But I can’t seem to figure out how to create a “transparent” picture object to draw into (and then “DrawPicture” over the background).
-
Use the BlendPictures (or possibly BlendPicturesWithMask?) routines in the MBS picture plug-in to blend the two layers together before drawing into the canvas, but then again, I need a transparent picture object to be blending. I could draw into the mask and then blend using the background, a solid color picture and the mask, but this would be limited to only a single color.
I’m sure that I’m missing something simple, but there’s nothing in any of the example files or documentation that I can find which applies. Can someone please point me in the right direction?
Cheers.
-bill k