Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3791

Picture.ApplyMask results in the picture being a black rectangle

$
0
0

Hi,

I’m drawing some small text into two pictures and applying one as the other’s mask, like this:

MainPict=DrawMyText
Mask=DrawMyText

MainPict.ApplyMask Mask

DrawMyText just draws a line of text in the picture, in greyscale (black font).

Putting a breakpoint at “MainPict.ApplyMask Mask”, I can see MainPict is as expected before stepping thru, then becomes solid black after ApplyMask is executed. I’m not sure what it means.

I don’t know what changed, but the same piece of code used to work. Perhaps it’s Sequoia that broke something :man_shrugging:
But even if I found the reason for this change, I don’t have any better idea to draw a text with transparency.

I also checked whether both pictures are of the same depth etc., and they are similar:
Properties of MainPict:
image
Properties of Mask:
image

Both pictures are as expected before ApplyMask; MainPict is this:
image

And Mask is:
image

Anyone noticed similar issues or can point a bug in my code, please?

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 3791

Trending Articles