Holds a single color value. The color values themselves are held as floating point values for all color spaces. For some spaces (such as indexed color spaces) the values will be integral, but still stored as floats. More...
#include <idomcolor.h>
Public Member Functions | |
virtual float | getAlpha () const =0 |
Retrieves the alpha channel value. The alpha channel value specifies the transparency of the color. | |
virtual void | setAlpha (float a)=0 |
Sets the alpha channel value. | |
virtual IDOMColorSpacePtr | getColorSpace ()=0 |
Retrieves the color space. | |
virtual void | setColorSpace (const IDOMColorSpacePtr &colorSpace, bool setDefaultColor=true)=0 |
Set the color space. | |
virtual void | setColorSpace (const IDOMColorSpacePtr &colorSpace, eRenderingIntent intent, eBlackPointCompensation bpc, IEDLClassFactory *pFactory)=0 |
Set the color space, converting color values from the previous color space to the new. | |
virtual float | getComponentValue (uint32 component)=0 |
Retrieves the value of a component. | |
virtual void | setComponentValue (uint32 component, float value)=0 |
Sets a component value. The value will be clipped to the range of the color space, if known. | |
virtual bool | testGamut (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &colorSpace, eRenderingIntent intent, eBlackPointCompensation bpc)=0 |
Tests the color is within the color gamut for the given color space. | |
Public Member Functions inherited from IEDLObject | |
virtual const CClassID & | getClassID () const =0 |
Returns class ID of IEDLObject. | |
virtual bool | init (CClassParams *pData) |
The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory. | |
virtual bool | clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory) |
Create a copy of EDLObject. | |
Public Member Functions inherited from IRCObject | |
virtual void | addRef () const =0 |
Increases the reference count of the actual object pointed to. This would take place during an assignment or copying. | |
virtual bool | decRef () const =0 |
Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. | |
virtual int32 | getRefCount () const =0 |
Retrieve the current reference count of the actual object pointed to. | |
Public Member Functions inherited from IDOMHashable | |
virtual | ~IDOMHashable () |
Virtual destructor. | |
virtual bool | hash (uint64 &hash)=0 |
Retrieve a hash for this object. | |
virtual uint64 | hashE () |
As hash(), but throws an exception if the operation fails. | |
Static Public Member Functions | |
static IDOMColorPtr | createSolidGray (IEDLClassFactory *pFactory, float gray=0.0f) |
Simplified color creation for DeviceGray colors. Default parameters will yield an opaque DeviceGray black. | |
static IDOMColorPtr | createSolidRgb (IEDLClassFactory *pFactory, float r=0.0f, float g=0.0f, float b=0.0f) |
Simplified color creation for DeviceRGB colors. Default parameters will yield an opaque DeviceRGB black. | |
static IDOMColorPtr | createSolidCmyk (IEDLClassFactory *pFactory, float c=0.0f, float m=0.0f, float y=0.0f, float k=0.0f) |
Simplified color creation for DeviceCMYK colors. Default parameters will yield an opaque DeviceCMYK white. | |
static EDL_API IDOMColorPtr | create (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &space, double alpha, double component) |
Simplified color creation routine for color spaces using a single component. Throws an IEDLError on failure. | |
static EDL_API IDOMColorPtr | create (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &space, double alpha, double component1, double component2) |
Simplified color creation routine for color spaces using two components. Throws an IEDLError on failure. | |
static EDL_API IDOMColorPtr | create (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &space, double alpha, double component1, double component2, double component3) |
Simplified color creation routine for color spaces using three components. Throws an IEDLError on failure. | |
static EDL_API IDOMColorPtr | create (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &space, double alpha, double component1, double component2, double component3, double component4) |
Simplified color creation routine for color spaces that take four components. Throws an IEDLError on failure. | |
static EDL_API IDOMColorPtr | create (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &space, double alpha, double component1, double component2, double component3, double component4, double component5) |
Simplified color creation routine for color spaces that take five components. Throws an IEDLError on failure. | |
static EDL_API IDOMColorPtr | create (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &space, double alpha, double component1, double component2, double component3, double component4, double component5, double component6) |
Simplified color creation routine for color spaces that take six components. Throws an IEDLError on failure. | |
static EDL_API IDOMColorPtr | create (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &space, double alpha, double component1, double component2, double component3, double component4, double component5, double component6, double component7, double component8=0.0, double component9=0.0, double component10=0.0, double component11=0.0, double component12=0.0, double component13=0.0, double component14=0.0, double component15=0.0, double component16=0.0, double component17=0.0, double component18=0.0, double component19=0.0, double component20=0.0, double component21=0.0, double component22=0.0, double component23=0.0, double component24=0.0, double component25=0.0, double component26=0.0, double component27=0.0, double component28=0.0, double component29=0.0, double component30=0.0, double component31=0.0, double component32=0.0) |
Simplified color creation routine for color spaces that take any number of components from 7 through to the maximum of 32. Throws an IEDLError on failure. | |
static EDL_API IDOMColorPtr | createFromVect (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &space, float alpha, const CEDLVector< float > &components) |
Simplified color creation routine. Throws an IEDLError on failure. | |
static EDL_API IDOMColorPtr | createFromArray (IEDLClassFactory *pFactory, const IDOMColorSpacePtr &space, float alpha, const float *components) |
Simplified color creation routine. Throws an IEDLError on failure. | |
static const CClassID & | classID () |
Retrieves the class id of IDOMColor. | |
Additional Inherited Members | |
Protected Member Functions inherited from IRCObject | |
virtual | ~IRCObject () |
Virtual destructor. | |
Holds a single color value. The color values themselves are held as floating point values for all color spaces. For some spaces (such as indexed color spaces) the values will be integral, but still stored as floats.
The color values themselves cannot be interpreted without reference to the referenced color space.
IDOMColor nodes are used to specify the colors of lines and strokes, not of images. Hence if an ArcSegment is drawn with a blue line, the blue is specified by an IDOMColor node.
|
inlinestatic |
|
static |
Simplified color creation routine for color spaces using a single component. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use. |
space | The color space to use. This must take one color component. |
alpha | The alpha to use. |
component | The color components to use. |
|
static |
Simplified color creation routine for color spaces using two components. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use. |
space | The color space to use. This must take two color components. |
alpha | The alpha to use. |
component1 | The first color components to use. |
component2 | The second color components to use. |
|
static |
Simplified color creation routine for color spaces using three components. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use. |
space | The color space to use. This must take three color components. |
alpha | The alpha to use. |
component1 | The first color components to use. |
component2 | The second color components to use. |
component3 | The third color components to use. |
|
static |
Simplified color creation routine for color spaces that take four components. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use. |
space | The color space to use. This must take four color components. |
alpha | The alpha to use. |
component1 | The first color components to use. |
component2 | The second color components to use. |
component3 | The third color components to use. |
component4 | The fourth color components to use. |
|
static |
Simplified color creation routine for color spaces that take five components. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use. |
space | The color space to use. This must take five color components. |
alpha | The alpha to use. |
component1 | The first color components to use. |
component2 | The second color components to use. |
component3 | The third color components to use. |
component4 | The fourth color components to use. |
component5 | The fifth color components to use. |
|
static |
Simplified color creation routine for color spaces that take six components. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use. |
space | The color space to use. This must take six color components. |
alpha | The alpha to use. |
component1 | The first color components to use. |
component2 | The second color components to use. |
component3 | The third color components to use. |
component4 | The fourth color components to use. |
component5 | The fifth color components to use. |
component6 | The sixth color components to use. |
|
static |
Simplified color creation routine for color spaces that take any number of components from 7 through to the maximum of 32. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use. |
space | The color space to use. This must take between 7 and 32 color components. |
alpha | The alpha to use. |
component1 | The first color component to use. |
component2 | The second color component to use. |
component3 | The third color component to use. |
component4 | The fourth color component to use. |
component5 | The fifth color component to use. |
component6 | The sixth color component to use. |
component7 | The seventh color component to use. |
component8 | The eighth color component to use (if applicable). |
component9 | The ninth color component to use (if applicable). |
component10 | The tenth color component to use (if applicable). |
component11 | The eleventh color component to use (if applicable). |
component12 | The twelth color component to use (if applicable). |
component13 | The thirteenth color component to use (if applicable). |
component14 | The fourteenth color component to use (if applicable). |
component15 | The fifteenth color component to use (if applicable). |
component16 | The sixteenth color component to use (if applicable). |
component17 | The seventeenth color component to use (if applicable). |
component18 | The eightteenth color component to use (if applicable). |
component19 | The nineteenth color component to use (if applicable). |
component20 | The twentieth color component to use (if applicable). |
component21 | The twenty-first color component to use (if applicable). |
component22 | The twenty-second color component to use (if applicable). |
component23 | The twenty-third color component to use (if applicable). |
component24 | The twenty-fourth color component to use (if applicable). |
component25 | The twenty-fifth color component to use (if applicable). |
component26 | The twenty-sixth color component to use (if applicable). |
component27 | The twenty-seventh color component to use (if applicable). |
component28 | The twenty-eighth color component to use (if applicable). |
component29 | The twenty-ninth color component to use (if applicable). |
component30 | The thirtieth color component to use (if applicable). |
component31 | The thirty-first color component to use (if applicable). |
component32 | The thirty-second color component to use (if applicable). |
|
static |
Simplified color creation routine. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use. |
space | The color space to use. |
alpha | The alpha to use. |
components | An array of color components to use, as floats or doubles. The number of floats MUST match the number of components expected of the color space. |
|
static |
Simplified color creation routine. Throws an IEDLError on failure.
pFactory | The EDL Class factory to use. |
space | The color space to use. |
alpha | The alpha to use. |
components | A vector of color components to use, as floats. The number of components MUST match the number of components expected of the color space. |
|
inlinestatic |
Simplified color creation for DeviceCMYK colors. Default parameters will yield an opaque DeviceCMYK white.
pFactory | The EDL Class factory to use. |
c | The cyan level to use. |
m | The magenta level to use. |
y | The yellow level to use. |
k | The black level to use. |
|
inlinestatic |
Simplified color creation for DeviceGray colors. Default parameters will yield an opaque DeviceGray black.
pFactory | The EDL Class factory to use. |
gray | The gray level to use (0 is black). |
|
inlinestatic |
Simplified color creation for DeviceRGB colors. Default parameters will yield an opaque DeviceRGB black.
pFactory | The EDL Class factory to use. |
r | The red level to use. |
g | The green level to use. |
b | The blue level to use. |
|
pure virtual |
Retrieves the alpha channel value. The alpha channel value specifies the transparency of the color.
Alpha values are between zero and 1. A value of 0 means that the color does not have any coverage information and is fully transparent; a value of 1 means that the color is fully opaque because the geometry completely overlapped the pixel.
|
pure virtual |
Retrieves the color space.
A device color space simply describes the range of colors, or gamut, that a camera can see, a printer can print, or a monitor can display. Editing color spaces, on the other hand, such as Adobe RGB or sRGB, are device-independent. They also determine a color range you can work in. Their design allows you to edit images in a controlled, consistent manner. A device color space is tied to the device it describes. An editing space, on the other hand, is gray-balanced colors with equal amounts of red, green, and blue appear neutral. Editing spaces also are perceptually uniform; that is, changes to lightness, hue, or saturation are applied equally to all the colors in the image.
|
pure virtual |
Retrieves the value of a component.
component | Index of the component. |
|
pure virtual |
Sets the alpha channel value.
a | Desired new alpha channel value. |
|
pure virtual |
Set the color space.
If the new color space has has the same number of components as the old, the values will be retained and clipped to the range of the new color space, if applicable. Otherwise if setDefaultColor is true, a default value will be set based on the minima of the range of the new color space.
colorSpace | Smart pointer to the desired new color space |
setDefaultColor | If true, and the new space has a different number of components than the previous space, a default color will be set. |
|
pure virtual |
Set the color space, converting color values from the previous color space to the new.
The destination color space must not be an Indexed or DeviceN color space. If the current color space is a DeviceN or Indexed space, if will be converted to the Alternate or Underlying color space before color conversion takes place. Further, if the resulting color is not visible (due to a DeviceN colorspace containing nothing but the special "None" colorant, then the resulting color will be given zero alpha and the default components for the destination color space will be set.
colorSpace | Smart pointer to the desired new color space. |
intent | The rendering intent to be used for conversion. The rendering intent refers to the way the CMM (Color Management Module) will handle out-of-gamut colors during a conversion from one color space to another. The ICC specification includes four different rendering intents: perceptual, relative colorimetric, absolute colorimetric, and saturation. |
bpc | Black point compensation handling. Black point compensation refers to the way the CMM (Color Management Module) will handle shadows in color conversion where the black point of the input and output color spaces differ. If in doubt, use eBPCDefault. |
pFactory | The EDL class factory. |
|
pure virtual |
Sets a component value. The value will be clipped to the range of the color space, if known.
component | Index of the component. |
value | New value of the component. |
|
pure virtual |
Tests the color is within the color gamut for the given color space.
The color space must not be an Indexed or DeviceN color space. If the current color space is a DeviceN or Indexed space, if will be converted to the Alternate or Underlying color space before color conversion takes place.
pFactory | The EDL class factory. |
colorSpace | Smart pointer to the color space to test against. |
intent | The rendering intent to be used for conversion. The rendering intent refers to the way the CMM (Color Management Module) will handle out-of-gamut colors during a conversion from one color space to another. The ICC specification includes four different rendering intents: perceptual, relative colorimetric, absolute colorimetric, and saturation. |
bpc | Black point compensation handling. Black point compensation refers to the way the CMM (Color Management Module) will handle shadows in color conversion where the black point of the input and output color spaces differ. If in doubt, use eBPCDefault. |