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:
Related emails:
  1. Minutes, SVG WG Telcon, 28 January 2010 (from anthony.grasso@cisra.canon.com.au on 2010-01-29)
  2. 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 ATOM feed


Dirk Schulze <dschulze@adobe.com>, Chair, Chris Lilley <chris@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 2302.html,v 1.1 2020/01/17 13:21:04 carcone Exp $