Transparent of Mask ?

In a current project I am (trying to) fine tuning, I actually use .Transparent.

That project do something simple: It have a template image, takes a user selected image (see it as a badge) resize it, and draw it centered * into the Template, then display it into a third Canvas.

  1. There is a Template Canvas,
  2. There is a User selected Canvas for the Badge Icon (to be resized to a specific size, always the same)
  3. There is a third Canvas to display the result (Template + Badge)

The result must have the white as Transparent, depending on a CheckBox value.

Nota:
The display image is smaller than the result image to be saved.

Now I can ask the subject question. What must I use:
a. Transparent Property (as I do right now) ?
b. Use a set of masks * ?

The application runs on Linux, mcOS and Windows (7-10).

Clues are welcome.

  • I can easilly set up a mask for the Templates (there are many, but all at the same size), but the badge image have an unknow form (can be a sqare, a rectangle, a circle, a polygon, Star of David, etc.) Creating a mask in this condition is something I will have to seriously think at… how I can do that.

PS: while I was working on this project, I get mask result without using one… funny until I wanted to squash that bug.

Emile… please read the LR…
Transparent for the CANVAS has nothing to do with the IMAGE of the canvas… it has to do with the CANVAS itself.

If you fill the canvas with a color (even pure white) that is what you will see…
If you draw a PICTURE into the canvas and that picture has a mask… or the picture has a DEPTH property (x,x,32) AND its transparent property is set to 1, then pure white in the PICTURE will show the CANVAS …which may in turn show the window that holds the CANVAS

    +-----+      Picture
  +---------+      Canvas
+---------------+ Window

If the WINDOW is BLUE and CANVAS has transparent=true… you will see BLLUE where the CANVAS IS
if PICTURE covers the entire CANVAS you will see BLUE wherever the Picture has a MASK (or is white and Transparent=1)

If CANVAS.TRANSPARENT=false, you will see probably “gray”