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.

This attribute is transformable.

startY

The y-coordinate for the end of the gradient line.

This attribute is transformable.

endX

The x-coordinate for the end of the gradient line.

This attribute is transformable.

endY

The y-coordinate for the end of the gradient line.

This attribute is transformable.

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.