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

Re: Mask property syntax and CSS <image>

From: Brian Birtles <bbirtles@mozilla.com>
Date: Mon, 06 Aug 2012 14:07:03 +0900
Message-ID: <501F50F7.7040302@mozilla.com>
To: Rik Cabanier <cabanier@gmail.com>
CC: Dirk Schulze <dschulze@adobe.com>, "public-fx@w3.org" <public-fx@w3.org>
(2012/08/06 13:44), Rik Cabanier wrote:
> Isn't the new mask used as follows:
>
>     <rect id ="r_1...>
>     <rect mask="element(#r_1)">
>
> or as CSS (?):
>
>     <rect id ="r_1...>
>     <rect style = "mask: element(#r_1);">
>
>
> If so, I think it's compatible with the css4 element() notation.
> In fact, I think we want the exact same wording and behavior as that
> element. (Including the wording on compositing over a transparent backdrop)

It's as Dirk mentioned, the way we described using element() was 
primarily for selection rather than rendering. The rendering is a 
separate step.

You should be able to use this scheme to target a <mask> element which 
we then process as usual (e.g. interpret the mask region, mask type 
etc.) rather than just rendering it as if it were an image.

This is especially necessary for paint servers when you need to 
disambiguate which child is the stroke and which is the fill.

The way we described it, the selection was scoped to the children of 
element where it is applied. e.g.

   <path fill="select(linearGradient)" stroke="select(solidColor)"/>
     <linearGradient/>
     <solidColor/>
   </path>

The example you gave above, "mask: element(#r_1);", still works if we 
allow a CSS <image> (which includes the element() syntax).

Brian
Received on Monday, 6 August 2012 05:07:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 August 2012 05:07:34 GMT