FOM Reference > Content > Colors > fGradientColor interface
  
fGradientColor interface
This object defines a color where a gradient will be used instead of a solid color.
GradientTypes enumeration
Which type of colours to use in the gradient.
The GradientTypes enumeration has the following constants of type int.
TYPE_RGB = 0
The gradient will be made using RGB colors. This value is not valid when combined with TYPE_CMYK.
TYPE_CMYK = 1
The gradient will be made using CMYK colors. This value is not valid when combined with TYPE_RGB.
TYPE_SOLID = 2
The gradient will be made using solid blocks of color instead of generating a raster.
TYPE_SPOT = 4
The gradient will be made using percentages of the specified spot color.
fillHorizontal attribute
How the gradient should be adjusted to fit the area horizontally. Values are in fNamedColor-ColorFillTypes.
fillHorizontal
Access
read-write
Returns
int
fillHorizontalSize attribute
The size parameter to use if required by the fill type.
fillHorizontalSize
Access
read-write
Returns
int
fillVertical attribute
How the gradient should be adjusted to fit the area horizontally. Values are in fNamedColor-ColorFillTypes.
fillVertical
Access
read-write
Returns
int
fillVerticalSize attribute
The size parameter to use if required by the fill type.
fillVerticalSize
Access
read-write
Returns
int
flags attribute
The flags to determine how the gradient is displayed. Values are in fNamedColor-ColorFlags.
flags
Access
read-write
Returns
int
matrix attribute
The matrix to apply to the gradient.
matrix
Access
read-write
Returns
fMatrix
resolutionX attribute
The horizontal resolution of the gradient, or the number of stripes to generate for a solid gradient.
resolutionX
Access
read-write
Returns
int
resolutionY attribute
The vertical resolution of the gradient.
resolutionY
Access
read-write
Returns
int
spotColor attribute
If type is set to TYPE_SPOT, percentages of this color will be used in the gradient.
spotColor
Access
read-write
Returns
fColor
stops attribute
An array containing the list of stop points in the gradient. When the gradient is first used, the stop positions will be normalised so they lie between 0 and 100%.
stops
Access
read-only
Returns
fGradientStop[]
type attribute
The type of gradient created. Values are in fGradientColor-GradientTypes.
type
Access
read-only
Returns
int
addStop method
Adds a new gradient stop to the stops array.
addStopgradientStop
Parameters
fGradientStopgradientStop
The gradient stop to add to the stops array. If this value is null or undefined, a new fGradientStop object will be created.
Returns
fGradientStop. The new fGradientStop object, adding it to the array of stops. All values in this object will be initialized to 0.
clearStops method
Clears all gradient stops from the stops array.
clearStops
Parameters
None
Returns
void. None.
removeStop method
Removes a gradient stop from the stops array.
removeStopgradientStop
Parameters
fGradientStopgradientStop
The gradient stop to remove from the stops array.
Returns
void. None.