Re: Fwd: Question on gradient userSpaceOnUse

Hi Dirk,

--Original Message--:
>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.

Sorry I don't understand what you are trying to say.

Yes I agree the transform is applied, and the gradient uses the
user space of the rect in the example.

The user space for x1,y1->x2,y2 goes along a diagonal direction,
not a horiztonal one, so the gradient should be perpendicular to
that vector.

Alex

>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 11:02:12 UTC