SVG filters feOffset and primitiveUnits

Hi,

I have a question to feOffset in SVG filters
( http://www.w3.org/TR/SVG11/filters.html#feOffset ).

dx and dy depend on primitiveUnits. But what does it mean?
Does it mean that if primitiveUnits is objectBoundingBox, the number
given to dx and dy are interpreted as percentage or still as "pixel"?

Short example:

<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" id="body" width="450"
height="500" viewBox="0 0 450 500">
    <g id="testContent" class="legend" style="text-anchor:middle">
        <defs>
            <filter id="tile_1" primitiveUnits="objectBoundingBox"
x="0%" y="0%" width="200%" height="200%">
                <feOffset x="-50%" y="-50%" width="100%" height="100%"/>
                <feOffset dx=".25"/>
            </filter>
        </defs>
        <rect x="0" y="0" width="100" height="100" style="fill:black;"/>
        <rect x="50" y="50" width="200" height="200"
style="fill:green;"/>
        <rect x="50" y="50" width="100" height="100" style="fill:red;
filter:url(#tile_1)"/>
    </g>    
</svg>

Firefox interprets dx="0.25" as 25% of the width of the referenced Image
and moves the previous filter primitive 25 pixel to the right.
Batik interprets it as 0.25 pixel and moves the output of the previous
filter primitive 0.25 pixel to the right side.

What is the right behavior?

-Dirk

Received on Friday, 12 June 2009 16:38:21 UTC