W3C home > Mailing lists > Public > www-svg@w3.org > July 2010

clip-path/filter/mask properties

From: Nikolas Zimmermann <zimmermann@physik.rwth-aachen.de>
Date: Fri, 30 Jul 2010 11:37:44 +0200
Message-id: <DCFF1A7D-58CA-4E01-940C-61ACF12A9AF0@physik.rwth-aachen.de>
To: www-svg@w3.org
Good morning SVG crowd,

I'm a bit confused with the definition of the filter/clip-path  
properties and the "Applies to" section.

1. clip-path property: (same problem for 'mask' property)
clip-path is not inherited and applies to "container elements" and  
"graphics elements".

"container elements" :  ‘a’, ‘defs’, ‘glyph’, ‘g’, ‘marker’, ‘mask’,  
‘missing-glyph’, ‘pattern’, ‘svg’, ‘switch’ and ‘symbol’.
http://www.w3.org/TR/SVG11/intro.html#TermContainerElement

"graphics elements":  ‘circle’, ‘ellipse’, ‘image’, ‘line’, ‘path’,  
‘polygon’, ‘polyline’, ‘rect’, ‘text’ and ‘use’.
http://www.w3.org/TR/SVG11/intro.html#TermGraphicsElement

But as <clipPath clip-path="url(#foo)"> is explicitely allowed in the  
clipPath notes:
"The ‘clipPath’ element or any of its children can specify property  
‘clip-path’."

It makes me wonder whether the "Applies to" section should be extended  
to list clipPath elements?

2. filter property:
filters have a similar problem. The "graphics elements" list does not  
contain "tspan". That sounds like <tspan filter="url(#foo)"/> is not  
allowed.
When expanding the "presentation attributes" list on http://www.w3.org/TR/SVG11/text.html#TSpanElement 
, it lists filter and clip-path.
This also affects altGlyph / textPath / tref.

Maybe I'm misinterpreting the "Applies to" section.
I ran into this problem when optimizing our code path to determine  
whether we should lookup clip-path/filters for certain elements.
Using the "container elements" and "graphics elements" lists as white  
list for elements where clip-path/filter is applyable fails, if certain
elements like tspan / clipPath are not included.

Can anyone explain the reason why the "Applies to" section is as it  
is :-)

Cheers,
Niko
Received on Friday, 30 July 2010 09:38:17 GMT

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