linearGradient

Linear gradient limits are defined by a line vector. This element has the following attributes:

Attribute Description
x1 The x-axis coordinate of the start point of the gradient vector. If the attribute is not specified, the default is 0%.
y1 The y-axis coordinate of the start point of the gradient vector. If the attribute is not specified, the default is 0%.
x2 The x-axis coordinate of the end point of the gradient vector. If the attribute is not specified, the default is 0%.
y2 The y-axis coordinate of the end point of the gradient vector. If the attribute is not specified, the default is 0%.
gradientUnits

Can be either userSpaceOnUse or objectBoundingBox; objectBoundingBox is the default.

  • userSpaceOnUsex1, y1, x2, and y2 values use the coordinate system at the time the gradient element is referenced.

  • objectBoundingBoxx1, y1, x2, and y2 values use the coordinate system that was established by the bounding box of the element to which the gradient is applied.