LinearGradient

A gradient transitioning between two colors along a line.

Syntax

<LinearGradient startX="float" startY="float" endX="float" endY="float"
                   colors="argb-color argb-color" positions="float float" />

Attributes

The LinearGradient element must contain the following attributes:

startX
The x-coordinate for the start of the gradient line.
startY
The y-coordinate for the end of the gradient line.
endX
The x-coordinate for the end of the gradient line.
endY
The y-coordinate for the end of the gradient line.
colors
A space-separated list of colors. You must specify each color using either the ARGB format (#ff000000 = opaque black) or the RGB format (#000000 = black).
positions
A space-separated list of floats. The relative positions [0..1] of each corresponding color in the colors attribute. If this is an empty string, the colors are distributed evenly along the gradient line.

Inner elements

The LinearGradient element can contain between 0 and 4 Transform elements.