W3C home > Mailing lists > Public > www-svg@w3.org > October 2009

Are filter primitive subregions clamped to the filter effects region?

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 20 Oct 2009 10:16:57 +1300
Message-ID: <11e306600910191416p1936b109v7ba4f539b8b4e166@mail.gmail.com>
To: www-svg <www-svg@w3.org>
Consider this example:

<svg xmlns="http://www.w3.org/2000/svg">
   <filter id="f1" x="0" y="0" width="20" height="10"
     <feFlood flood-color="green" x="-10" y="0" width="20" height="10"/>
     <feTile x="0" y="0" width="20" height="10"/>
   <rect x="0" y="0" width="20" height="10" filter="url(#f1)"/>

I see two possible renderings:

1) the filter primitive subregion for the feFlood is the rectangle
(-10,0)-(10,10). The output is a green rectangle at (0,0)-(10,10). (The
rectangle (10,0)-(10,10) is filled with the left half of the feFlood filter
primitive subregion, which is presumably transparent since it's outside the
filter region.)
2) the filter primitive subregion for the feFlood is clamped to the filter
effects region, i.e. (0,0)-(10,10). The output is a green rectangle at
(0,0)-(20,10) since we get two full copies of the tile.

IMHO the spec is much too vague on the exact definition of the filter
primitive subregion:

All intermediate offscreens are defined to not exceed the intersection of *x
> *, *y*, *width* and *height* with the filter region<http://www.w3.org/TR/SVG/filters.html#FilterEffectsRegion>.
> The filter region and any of the *x*, *y*, *width* and *height* subregions
> are to be set up such that all offscreens are made big enough to accommodate
> any pixels which even partly intersect with either the filter region or the
> x,y,width,height subregions.

I interpret this discussion of "intermediate offscreens" as an
implementation note that does not affect the actual definition of the
"filter primitive subregion", in which case rendering #1 would be correct.
But if this is supposed to affect the filter primitive subregion rectangle
that feTile uses, then rendering #2 would be correct. Please write a clear
definition of "filter primitive subregion" into the spec. I also suggest
removing all language about "intermediate offscreens" or else making it into
a clearly identified "implementation note".

"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
Received on Monday, 19 October 2009 21:17:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:19 UTC