Previous Element | Next Element |
LinearGradient
This defines a linear gradient fill for an enclosed area.
The bounds of the gradient are specified with a base point
and a distance over which the gradient is rendered. A
gradient can have up to eight stop points each defining a
percentage offset from the start of the ramp and a color.
Colors are interpolated between the stop points from left to
right to create the color ramp. At least two gradient stop
points must be specified. All area to the left of the ramp
are padded with the first ramp color and all colors to tight
of the ramp are padded with the final color. The ramp can be
rotated around the base point. The color offsets of stop
points must be in ascending order and where two adjacent
stop points are specified with the same offset all colors to
the left of the specified offset will ramp to the first
color and colors to the right will ramp from the second
color.
Attributes
x | X coordinate for the base point of the gradient. | |
Type | Float | |
Default Value | 0 | |
y | Y coordinate for the base point of the gradient. Only used when the gradient is rotated. | |
Type | Float | |
Default Value | 0 | |
length | The length of the gradient. | |
Type | Float | |
Default Value | None | |
rotate | Optional attribute indicating a clockwise rotation in degrees of the gradient about the base location. | |
Type | Float | |
Default Value | 0 | |
index | Specifies the index of the current entry in the table. Informational attribute produced on decompilation. Not used on input. | |
Type | Integer | |
linearRGB | Flash renders all gradients in a manner that produces different output from those of other applications. Flash 8 has added a new flag to gradient fills that permits the gradient to be interpolated using a linear RGB interpolation which is used for SVG-like gradients. | |
Values |
| |
Default Value | no | |
spreadMethod | Prior to Flash 8, the color outside the defined gradient box was the same color as the terminal gradient colors. Flash 8 provides additional control over the colors outside of the gradient box by allowing two additional overflow modes: 'repeat', and 'reflect' | |
Values |
| |
Default Value | pad |
Child Elements
StopParent Elements
FillStylePairFillStyles
Examples
Color Gradient ExamplesMorphShape Example
Previous Element | Next Element |