W3C home > Mailing lists > Public > public-fx@w3.org > July to September 2012

Re: Specifying mask type for <mask> elements

From: Dirk Schulze <dschulze@adobe.com>
Date: Wed, 26 Sep 2012 09:03:39 -0700
To: Brian Birtles <bbirtles@mozilla.com>
CC: "public-fx@w3.org" <public-fx@w3.org>
Message-ID: <ED32692D-189D-47EE-B610-46EA0B8A07E6@adobe.com>

I thought about adding the optional keywords 'alpha','luminance' to a <mask> reference again. It is not possible to differ between an image reference and a mask reference at parse time. As an example:

mask: url(test.svg#fragment) alpha;

The parser realizes that the reference is a valid URL. But the fragment can either point to a resource (mask, clipPath, linearGradient, radialGradient, pattern) or graphical element (rect, circle, path,). The document might not reachable at all.

But while the above syntax would be correct for a reference to a graphical element, it is incorrect if it references a mask resource.

I suggest adding these keywords again to be consistent with the behavior of parsers.

The problem is, that it still does not make sense for most <mask> elements to let the masked object decide about the 'mask-type'. A mask mostly just good for one think: luminance or alpha masking. We could ignore the keywords in the case of a <mask> reference.


On Sep 25, 2012, at 7:44 PM, Brian Birtles <bbirtles@mozilla.com> wrote:

> Hi,
> Just a quick note about overriding mask-type. Although I haven't traced 
> the actual chain of resolutions that lead to this, I want to point out 
> that for the mask property we previously allowed:
>  <mask id="a">
>    ...
>  </mask>
>  <path mask="url(#a) alpha" ... />
> But now we don't. That is, you could override the mask-type of the 
> <mask> element by specifying it on the mask property, but now the 
> grammar doesn't allow that.
> You can, of course, still specify the mask type when referring to pretty 
> much anything else (e.g. "url(a.svg) alpha", "linear-gradient(...) 
> luminance", "element(#linearGrad) luminance") but not <mask>.
> Is that ok or should we allow overriding mask-type?
> Best regards,
> Brian Birtles
Received on Wednesday, 26 September 2012 16:05:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:42 UTC