W3C home > Mailing lists > Public > www-svg@w3.org > August 2012

Re: MASKING AND COVERAGE: AGAIN

From: Dmitry Baranovskiy <baranovs@adobe.com>
Date: Mon, 6 Aug 2012 19:14:01 -0700
To: Bob Holmes <rangsynth@gmail.com>
CC: Rik Cabanier <cabanier@gmail.com>, Nikos Andronikos <Nikos.Andronikos@cisra.canon.com.au>, "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <51610C1D-5352-47B9-8928-C88B6ADFC3EB@adobe.com>
Hi Bob,

I guess this is the same thing as using opacity on elements and on the group. It behaves differently. And because image is worth a thousand words here is an example: http://dmitry.baranovskiy.com/group-masking.svg

View it in anything, but Safari. Applying mask to each element individually cause them to “interact with each other”, while applying it to the group is different.

Hope it helps and I am not stating the obvious.

best,
Dmitry

On 07/08/2012, at 8:10 AM, Bob Holmes wrote:

I am at the point now where I have zero confusion except this masking business vs. grouping. Any further comments would be appreciated on this.

MY ORIGINAL COMMENT
For modes like DstIn masking would thus have no effect.

The blend function for RGBA excepts a value from 0 to 255.
I also have a global alpha value which affects all alpha.

My theory is that no matter the blend mode or combine mode that source
pixels can simply have the alpha adjusted by multiplying with both
global alpha and the mask value, which can optimally be combined prior
to actually calling into the blenders.

>>No, if you have grouping, you can't simply redistribute alpha. That will make the graphics interact with each other which is usually not desired.

What does it mean "can't simply redistribute the alpha"?

If I take a masking value of 255 and simply multiply it with the source color alpha. The source color does not change. But for the edges of the polygon where it is antialiased the mask value might be 64 for example, so multiplying that with the alpha of the color and then calling into the blender/composite function is surely the way to go?

Any notes on how the grouping affects this simple alpha masking will help.
Received on Wednesday, 8 August 2012 22:25:06 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:52 GMT