ISSUE-2302: How gradients are transformed by an object transform is unclear
Object transforms effect on Gradients
How gradients are transformed by an object transform is unclear
- State:
- RAISED
- Product:
- SVG 2
- Raised by:
- Anthony Grasso
- Opened on:
- 2010-01-28
- Description:
- 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. - Related Actions Items:
ACTION-2711 on Anthony Grasso to Test the gradient output of authoring tools and report back - due 2010-01-18, closedACTION-2728 on Anthony Grasso to Add new wording for clarifying userspaceonuse gradients to SVG 1.1 second edition, and add a corresponding errata item for SVG Tiny 1.2 - due 2010-02-18, closed- Related emails:
- Minutes, SVG WG Telcon, 28 January 2010 (from anthony.grasso@cisra.canon.com.au on 2010-01-29)
- ISSUE-2302 (Object transforms effect on Gradients): How gradients are transformed by an object transform is unclear [SVG Core 2.0] (from sysbot+tracker@w3.org on 2010-01-28)
Related notes:
No additional notes.
Display change log