[filter-effects] subregion as hard clipping region

Hi,

Even if this has the prefix [filter-effects], it is related to SVG 1.1 as well. So I post this on both mailing lists: www-svg and public-fx.

A subregion on a filter primitive interacts as a hard clipping region. SVG misses to clarify what gets clipped, the input? the output? both?[1] So the new Filter Effects specification tries to solve this issue [2] according to previous resolutions (Cameron, can you find the resolution?). The default clipping behavior according to Filter Effects 1.0 is clip both, the input as well as the output.

I wrote a short example and this shows the difference between implementations on the clipping behavior (at least for input clipping).

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<filter id="filter" primitiveUnits="objectBoundingBox">
	<feFlood x="50%" y="50%" width="50%" height="50%" flood-color="green" result="inputClipped"/>
	<feFlood x="0%" y="0%" width="50%" height="50%" flood-color="green" result="input"/>
	<feOffset x="50%" y="50%" width="50%" height="50%" dx="0.5" dy="0.5" in="input" result="clipOut"/>
	<feComposite in="clipOut" in2="inputClipped" x="0%" y="0%" width="100%" height="100%"/>
</filter>
<rect width="200" height="200" filter="url(#filter)"/>
</svg>

It looks like we have a different behavior across viewers.
The following viewers clip the input: Opera, IE 10, Batik
Viewers which don't clip the input are: WebKit (Safari, Chrome), Firefox, Illustrator, Inkscape (last two with bugs)

Do we want to stay with the default behavior? Are the other viewers willing to change? I can do the change on WebKit. Would Firefox do it as well?

Second question: Do we want to introduce a new keyword to support clipping of input or output? Something like clip-input, clip-output, clip-both? Where could theses keywords be added? To the filter primitives with a new CSS property?

Greetings,
Dirk

[1] http://www.w3.org/TR/SVG/filters.html#FilterPrimitiveSubRegion
[2] https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#FilterPrimitiveSubRegion

Received on Tuesday, 7 August 2012 20:31:59 UTC