Re: Fwd: Question on gradient userSpaceOnUse

Am Dienstag, den 05.01.2010, 19:18 +1100 schrieb Alex Danilo:
> 
> So, my take is that Opera is correct, and many others
> are incorrect.

I disagree. In following parts:

http://www.w3.org/TR/SVG11/coords.html#EstablishingANewUserSpace
http://www.w3.org/TR/SVG11/coords.html#TransformAttribute

you can read, that the transform transforms the user space coordinates
of the element before any other operation is applied to the element.

This means that the gradient should use the user space of the element.
And with this view, FireFox, WebKit and Batik are right.

This is another test from Jeff:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
  <pattern id="p2" patternUnits="userSpaceOnUse" x="0" y="0" width="80"
height="20">
    <rect x="0" y="0" width="40" height="10" fill="red"/>
    <rect x="40" y="0" width="40" height="10" fill="green"/>
    <rect x="0" y="10" width="40" height="10" fill="blue"/>
    <rect x="40" y="10" width="40" height="10" fill="yellow"/>
  </pattern>
</defs>
  <g transform="translate(200)">
      <rect id="cr" width="400" height="50" fill="none"
stroke="url(#p2)" stroke-width="15" transform="scale(0.25, 1)"/>
  </g>
</svg>

You can see it on the pattern, that opera is doing it that way for
patterns too, like the others. Otherwise you shouldn't see quadrats for
the pattern.

-Dirk

Received on Tuesday, 5 January 2010 10:29:31 UTC