To draw with transparent fill, the image you are drawing on should be fully transparent. For example (Windows BAT syntax):
Code: Select all
%IMG7%magick ^
-size 600x400 xc: -alpha transparent ^
-fill rgba(75%%,100%%,0,0.35) ^
-draw "rectangle 66,50 200,150" ^
-draw "rectangle 150,100 250,300" ^
out.png
If you want to draw with transparent fill over an opaque image: first clone the image, make it transparent, draw on it, and composite this over the opaque image.
Code: Select all
%IMG7%magick ^
logo: ^
( +clone -alpha transparent ^
-fill rgba(75%%,100%%,0,0.35) ^
-draw "rectangle 66,50 200,150" ^
-draw "rectangle 150,100 250,300" ^
) ^
-compose Over -composite ^
transdraw.png
Does that answer the question?
EDIT: An alternative is to use "-background None":
Code: Select all
%IMG7%magick ^
logo: ^
-background none ^
-fill rgba(75%%,100%%,0,0.35) ^
-draw "rectangle 66,50 200,150" ^
-draw "rectangle 150,100 250,300" ^
transdraw2.png