Previous Element | Next Element |
RadialGradient
This defines a radial gradient fill for an enclosed area.
The bounds of the gradient are specified with a center point
and a pair of elliptical radii 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.
When the radii are different values 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
cx | X coordinate for the center point of the gradient. | |
Type | Float | |
Default Value | 0 | |
cy | Y coordinate for the center point of the gradient. | |
Type | Float | |
Default Value | 0 | |
rx | The X radius of the gradient. | |
Type | Float | |
Value Range | >0 | |
Default Value | None | |
ry | The Y radius of the gradient. | |
Type | Float | |
Value Range | >0 | |
Default Value | None | |
rotate | Optional attribute indicating a clockwise rotation in degrees of the gradient about the base location. Only used when the rx and ry attributes are different. | |
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 | |
xDisp | Prior to Flash 8, all radial gradients were uniform and it was not possible to adjust the center of the gradient without modifying the bounds of the gradient. The xDisp attribute was added in FLash 8 to allow the ceter of the gradient to be shifted left or right along the X axis woutout modifying the bounds of the gradient. This permits must more realistic effects alloing different gradient densities from a single gradient definition. | |
Type | Float | |
From Value | -100 | |
To Value | +100 | |
Default Value | 0 |
Child Elements
StopParent Elements
FillStylePairFillStyles
Examples
Color Gradient ExamplesClipping and Text Clipping Example
Previous Element | Next Element |