Create a Transparent area in a Picture

Is there anyway to draw a transparent (line, rectangle etc) on an existing picture… Without having to directly manipulate the mask layer

Obviously creating a “transparent” color doesn’t work.

Using a RectShape with a .fill of 50 will do the trick for a rectangle, and the same is true for other Object2Ds

nope… been there done that :slight_smile:

I created a picture that was solid red. then set a color with an alpha of 255 and drew a thick line… and it was an “invisible” line over the already RED background… I wanted the area that I drew to remove/replace the color that was already there.

Hello Dave, draw white and set the tranparens = 1
then the background seems dark (dark mode) or white
Unfortunately everything is transparent

bild = New picture (example.Width, example.height, 32)
picture.Graphics.drawpicture example, 0,0
bild.Graphics.forecolor = Color.White
image.Transparent = 1
bild.Graphics.filloval (beispiel.Width / 2, for / 2,100,100)

with mask it is much easier
Dim buffer As picture
buffer = bild.Mask
buffer.Graphics.forecolor = HSV (0,0,1)
buffer.Graphics.filloval (200,200,200,200)

greetings Rudolf

bild.Graphics.filloval (example.Width / 2, example.height / 2,100,100)

that actually doesn’t seem to work well anymore .
I have a PAINT program I wrote years back that used that exact principal (as it was the ONLY way then)
Mojave doesn’t seem to like this, as it renders any area treated that way as solid BLACK

I’m redesigning this app to bring it into the 21st century, since I use it on a daily basis.

I could get the functions I want by drawing on both the picture layer and mask layer at the same time, but was hoping to avoid the complexity that a cut/paste operation would bring to the table.