I have a sample app where I want to draw images with alpha channels so overlapping images will show the image underneath. No matter what I do, I can’t get that to work. If I query the hasalphachannel property, it responds that the image has an alpha channel.
I am using a canvas with a picture buffer to draw the images inside a larger canvas., as per Eugine Dakin’s ebook on how to use a canvas.
Thanks for your reply. My situation is a little different, as per the sample app I uploaded. I have a png image with an alpha channel. I draw that picture into two canvas objects which are on a background canvas control. If I drag one of those canvas objects over the other canvas object, the one underneath does not show through the transparent part of the top image. The transparent parts of the top image are drawn as solid white not as transparent.
That is my problem, I need the bottom image to be visible through the transparent parts of the top image.
Hi Bob, I downloaded your project and deleted all trailing “, 32” from all “New Picture” commands in your project. This way all transparent parts are no longer white and overlapping objects show through these transparent parts.
Did you ever consider using Pixmapshape?
did as you suggested and you’re right, it now works. Interestingly though, I found I had to leave one new picture command with the ,32 attribute. That is the one in the one in the INIT method of the CustomCanvas control. This controls the drawing of a canvas object whilst being dragged. Take out the ,32 attribute and each draw of the object as it is being dragged remains on the screen creating a terrible mess of rectangles. Leave it in and al you see is a single rectangle being dragged across the window and finally draw in place.