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

Re: Fwd: Question on gradient userSpaceOnUse

From: Dirk Schulze <vbs85@gmx.de>
Date: Tue, 05 Jan 2010 11:28:57 +0100
To: Alex Danilo <alex@abbra.com>
Cc: Jeff Schiller <codedread@gmail.com>, www-svg <www-svg@w3.org>
Message-ID: <1262687337.25524.30.camel@dirk-laptop>
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.

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"/>
  <g transform="translate(200)">
      <rect id="cr" width="400" height="50" fill="none"
stroke="url(#p2)" stroke-width="15" transform="scale(0.25, 1)"/>

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 10:29:31 UTC

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