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

Re: Proposed wording for 'how object transforms affect gradient rendering output'

From: Cyril Concolato <cyril.concolato@enst.fr>
Date: Thu, 04 Feb 2010 09:24:55 +0100
Message-ID: <4B6A8457.2040908@enst.fr>
To: anthony.grasso@cisra.canon.com.au
CC: www-svg@w3.org
Hi Anthony,

Here are some comments.

In your wording you use the term 'initially'. I think I understand what it means but I would prefer if you would say something like: "before any transformation is applied to the gradient".

You also mention the magnitude of the normal. I don't understand what it means and how it is used. To me, it is sufficient to say that the normal is perpendicular, we don't even need to say the direction +90° or -90°. It does not matter.

Concerning the order between object transforms and gradient transforms, are you sure about it? I thought it was first apply gradient transforms because they apply to all reference of the gradients, then object transforms. If you look at SVG 1.1 [1], you'll find:
"[The gradientTransform] transformation matrix is post-multiplied to (i.e., inserted to the right of) any previously defined transformations, including the implicit transformation necessary to convert from object bounding box units to user space."

Concerning the position of the text. I think the first two sentences "The angle ... vector." only apply to linear gradients because of the notion of gradient vector. For the rest of the paragraph, it's fine to put it in the introduction.

Regards,

Cyril

[1] http://www.w3.org/TR/SVG11/pservers.html#LinearGradientTransformAttribute

Le 04/02/2010 05:58, Anthony Grasso a écrit :
> Hi SVG WG,
>
> In relation to the discussion on "gradient userSpaceOnUse" [1] and the
> investigation I did on "how authoring tools apply object transforms to
> gradients" [2], I have devised some wording to put in (possibly) current
> and future SVG specifications.
>
> I propose adding the following wording and diagrams for the different
> parts in the gradient section:
>
> Wording to be placed after the first paragraph of the introduction for
> gradients [3] (in SVG Tiny 1.2)
>
> [[
> The angle of the color transitions along the gradient vector is defined
> by the gradient normal (see diagram below). Initially, the gradient
> normal is perpendicular with the gradient vector and is the same
> magnitude as the gradient vector. If an object references a gradient,
> conceptually the object should take a copy of the gradient vector and
> gradient normal and treat it as part of its own geometry. Any
> transformations applied to the object geometry also apply to the copied
> gradient vector and gradient normal. Any gradient transforms that are
> specified on the reference gradient are applied after object
> transformations have been applied but prior to rendering.
> ]]
>
>
> The wording in the last sentence of the second last paragraph for
> gradientUnits attribute [4] should be reworded to:
>
> [[
> When the object's bounding box is not square, the gradient normal which
> is initially perpendicular to the gradient vector within object bounding
> box space shall render non-perpendicular relative to the gradient vector
> in user space. This transformation is due to application of the
> non-uniform scaling transformation from bounding box space to user space.
> ]]
>
>
>
> Note that this wording is a first draft and open to discussion. To my
> understand of the issue, there are some implementations that have an
> alternative method of applying transforms and thus producing a different
> result. I can sympathise that this wording is potentially contentious,
> but given that gradients are an integral part of any graphics language,
> a consensus must be reached on this issue so all implementations will
> produce the same result.
>
> Cheers,
>
> Anthony
>
>
> [1] http://lists.w3.org/Archives/Public/www-svg/2010Jan/0000.html
> [2] http://lists.w3.org/Archives/Public/public-svg-wg/2010JanMar/0035.html
> [3] http://www.w3.org/TR/SVGTiny12/painting.html#Gradients
> [4]
> http://www.w3.org/TR/SVGTiny12/painting.html#LinearGradientUnitsAttribute


-- 
Cyril Concolato
Maître de Conférences/Associate Professor
Groupe Mutimedia/Multimedia Group
Telecom ParisTech
46 rue Barrault
75 013 Paris, France
http://concolato.blog.telecom-paristech.fr/
Received on Thursday, 4 February 2010 08:25:18 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:44 GMT