W3C home > Mailing lists > Public > www-svg@w3.org > January 2010

Re: Fwd: Question on gradient userSpaceOnUse

From: Alex Danilo <alex@abbra.com>
Date: Tue, 05 Jan 2010 22:01:28 +1100
Message-Id: <GATRVK.YSKKVIHE4TPL@abbra.com>
To: Dirk Schulze <vbs85@gmx.de>
Cc: Jeff Schiller <codedread@gmail.com>, www-svg <www-svg@w3.org>

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


>This is another test from Jeff:
><?xml version="1.0" encoding="UTF-8"?>
><svg xmlns="http://www.w3.org/2000/svg"
>  <pattern id="p2" patternUnits="userSpaceOnUse" x="0" y="0" width="80"
>    <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>
>  <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>
>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.
Received on Tuesday, 5 January 2010 11:02:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:29:42 UTC