gradientUnits attribute | gradientUnits property
Gets a value that indicates the type of coordinate system that is used because of a transformation.
<element gradientUnits="p" ... >
p = object.gradientUnits
The type of coordinate system that is used when a gradient is calculated.
- Scalable Vector Graphics: Gradients and Patterns, Section 13.4.1
When p is objectBoundingBox and the gradientTransform property is the identity matrix, the normal of the linear gradient is perpendicular to the gradient vector in object bounding box space. 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) might render non-perpendicular relative to the gradient vector in user space. If the gradient vector is parallel to one of the axes of the bounding box, the gradient normal remains perpendicular. This transformation occurs because of the non-uniform scaling transformation from bounding box space to user space.