W3C home > Mailing lists > Public > public-svg-wg@w3.org > January to March 2010

ISSUE-2302 (Object transforms effect on Gradients): How gradients are transformed by an object transform is unclear [SVG Core 2.0]

From: SVG Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Thu, 28 Jan 2010 05:41:11 +0000 (GMT)
To: public-svg-wg@w3.org
Message-Id: <20100128054111.AEB786B646@tibor.w3.org>

ISSUE-2302 (Object transforms effect on Gradients): How gradients are transformed by an object transform is unclear [SVG Core 2.0]

http://www.w3.org/Graphics/SVG/WG/track/issues/2302

Raised by: Anthony Grasso
On product: SVG Core 2.0

The wording in SVG Tiny 1.2 is very ambiguous regarding the gradient vector and when it is transformed.
http://www.w3.org/TR/SVGTiny12/painting.html#LinearGradientElement#LinearGradientUnitsAttribute

[[
If gradientUnits="userSpaceOnUse", 'x1', 'y1', 'x2', 'y2' shall represent values in the coordinate system that results from taking the current user coordinate system in place at the time when the gradient element is referenced"
]]

A gradient direction is defined by the vector, but there is a second component which defines the direction of the stripes on a linear gradient - the Gradient Normal. Information on how the normal is used for rendering linear gradients needs to be added to the SVG specifications. 

The problem is at what point in time the gradient normal is transformed. >From a technical perspective the two different results can be achieved both of which are correct.

Implementation 'A' defines a Gradient Vector and a Gradient Normal prior to being transformed. When the transformation is applied both vector and normal are transformed.

Implementation 'B' defines a Gradient Vector only prior to being transformed. When the transform is applied the vector is transformed. The normal is then defined on the gradientprior to any gradientTransform attributes being applied.

Given that the specification is ambiguous about the 'time' a gradient element is reference and additionally does not define how a gradient normal works with a gradient vector both implementations are technically correct. The question then remains which method would look better for authoring.
Received on Thursday, 28 January 2010 05:41:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:11 UTC