Masking - Mistake in Inkscape Guide

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Kjohrf
Posts: 170
Joined: Tue Oct 27, 2009 11:42 am
Location: US
Contact:

Masking - Mistake in Inkscape Guide

Postby Kjohrf » Wed Apr 28, 2010 12:33 pm

Maybe I'm reading it wrong, but on:

http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Clip-Masking.html

it says

Regions with minimum lightness (i.e., black) will be fully transparent.


But my quick experiment in 0.47 shows the opposite. Black areas in the mask make
the masked object non-transparent. The other two statements seem to work as advertised.

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: Masking - Mistake in Inkscape Guide

Postby kelan » Wed Apr 28, 2010 10:05 pm

Just tested on Windows XP, Inkscape v0.47: black star grouped with a white circle to make a masking object, blue rectangle being masked. The portion of the blue rectangle under the black star is transparent, while the portion under the white circle is visible.

User avatar
Kjohrf
Posts: 170
Joined: Tue Oct 27, 2009 11:42 am
Location: US
Contact:

Re: Masking - Mistake in Inkscape Guide

Postby Kjohrf » Thu Apr 29, 2010 1:55 am

I just tried this. Make a large red rectangle. Now make a black ellipse, mostly overlapping the rectangle, and change the fill to a circular gradient. The outside of the ellipse will be transparent. Select both and set the mask. The entire rectange disappears. That doesn't seem right.

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: Masking - Mistake in Inkscape Guide

Postby tomh » Thu Apr 29, 2010 9:39 am

Kjorhrf, that is the correct behavour.

the mask uses the HSLA colour scheem (hue, saturation lightness.
For masks, it uses the L and A values.

the thing to remember is that it uses the lightness value of the colour as the mask. Alpha (transparency also counts)

so: black=0 ,white =255
fAlpha =0 (fully transparent), Alpha=255 = fully obaque

then it obaquacy of the mask is LA, so if the mask is white /and/ A=255, the object masked will be fully opaque. if you use black in the mask, or set the opacacy of the mask to 0 (fully transparent), the masked object will also be fully transparent.


Return to “Help with using Inkscape”