FOM Reference > Content > Colors > fNamedColor interface
  
fNamedColor interface
This object defines a named color which can be stored in the template as a tag. This object inherits from fColor and fControl.
ColorFlags enumeration
The flags to use when displaying either a gradient or raster color.
The ColorFlags enumeration has the following constants of type int.
TYPE_FOLLOW = 1
The raster or gradient will be rotated to match the rotation of the containing object.
TYPE_TOPLEFT = 2
The raster or gradient will be placed starting in the top left of the containing object.
TYPE_CMYK = 4
The raster or gradient will be converted to cmyk during printing.
TYPE_INNER = 8
TYPE_OUTER = 16
TYPE_PAD = 32
TYPE_LEFT = 64
TYPE_RIGHT = 128
TYPE_TOP = 256
TYPE_BOTTOM = 512
TYPE_SOLID = 1024
If the color is a gradient, it shall be generated using solid blocks of color instead of generating a raster. This flag is ignored for raster colors.
TYPE_SPOT = 2048
If the color is a gradient, it shall be generated using percentage values of the specified spot color. This flag is ignored for raster colors.
ColorFillTypes enumeration
The flags to determine how the gradient or raster should be adjusted to fit the area.
The ColorFillTypes enumeration has the following constants of type int.
FILL_CENTER = 1
The gradient or raster will be drawn in the center of the content area.
FILL_REPEAT = 2
The gradient or raster will be repeated to ensure the content area is filled.
FILL_SHRINK = 4
The gradient or raster will be made smaller to match the dimensions of the content area.
FILL_SHRINKREPEAT = 8
The gradient or raster will be made smaller to match the dimensions of the content area, and will be repeated to fill any remaining space in the other axis.
FILL_ENLARGE = 16
The gradient or raster will be made larger to match the dimensions of the content area.
FILL_ENLARGEREPEAT = 32
The gradient or raster will be made larger to match the dimensions of the content area, and will be repeated to fill any remaining space in the other axis.
FILL_STRETCH = 64
The gradient or raster will be stretched both horizontally and vertically to ensure the content area is filled.
FILL_STRETCHREPEAT = 128
The gradient or raster will be stretched in one axis to fit the content area, and will be repeated to fill any remaining space in the other axis.
opacity attribute
The percentage opacity to draw this image on supported output drivers.
opacity
Access
read-write
Returns
float
printerColor attribute
Which color to use during printing. If null, then the default color properties specified on this object will be used.
printerColor
Access
read-write
Returns
fPrinterColor
printerName attribute
The name of the color to output when printing.
printerName
Access
read-write
Returns
String
readResolve method
Return the object corresponding to the given serialized representation.
readResolveobj
Parameters
Objectobj
The serialized representation.
Returns
fNamedColor. The object corresponding to the serialized representation.
setColor method
Sets this color to the RGB / CMYK values of the input color.
setColorcolor
Parameters
fColorcolor
The color to take a copy of.
Returns
void. None.
writeReplace method
Create a serializable representation of this object.
writeReplace
Parameters
None
Returns
Object. A serializable representation of this object.