InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IColorData Class Referenceabstract

#include <IColorData.h>

Inheritance diagram for IColorData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ICOLORDATA }
 

Public Member Functions

virtual int32 GetColorSpace () const =0
 
virtual const ColorArrayGetColorData () const =0
 
virtual int32 GetNumComponents () const =0
 
virtual PMReal GetNthComponent (int32 index) const =0
 
virtual void SetColorSpace (int32 space)=0
 
virtual void SetColorData (const ColorArray &componentArray)=0
 
virtual void SetColorData (int32 space, const ColorArray &componentArray)=0
 
virtual bool16 IsEqual (const IColorData *iColorData) const =0
 
virtual void SetConvertToHSB (bool16 convertToHSB)=0
 
virtual bool16 GetConvertToHSB () const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

An interface for InDesign document color data or UI color data.

Member Function Documentation

virtual const ColorArray& IColorData::GetColorData () const
pure virtual

Return the color array corresponding to the color space.

Returns
the ColorArray.
virtual int32 IColorData::GetColorSpace () const
pure virtual

Return the color space. Color space can be one of kPMCsCalRGB, kPMCsCalCMYK, kPMCsLab, or kPMCsDeviceN.

Returns
the color space.
See Also
GraphicTypes.h
virtual bool16 IColorData::GetConvertToHSB () const
pure virtual

Return the value of flag convertToHSB

virtual PMReal IColorData::GetNthComponent (int32 index) const
pure virtual

Return nth component of the color array corresponding to the color space.

Parameters
indexthe nth component starting with 0.
Returns
the nth component of color array.
virtual int32 IColorData::GetNumComponents () const
pure virtual

Return number of color components corresponding to the color space. For kPMCsCalRGB and kPMCsLab, number of components should be 3. For kPMCsCalCMYK, number of components should be 4. For kPMCsDeviceN, number of components should match the number of inks.

Returns
the number of color components.
virtual bool16 IColorData::IsEqual (const IColorDataiColorData) const
pure virtual

Compares two color data. Returns kTrue if they are equal.

Parameters
iColorDatathe color data to compare to.
Returns
kTrue if they are equal, otherwise returns kFalse.
virtual void IColorData::SetColorData (const ColorArraycomponentArray)
pure virtual

Sets the color array corresponding to the color space. Typically color space is set first before setting the color array.

Parameters
componentArraythe color array to set.
See Also
GraphicTypes.h
virtual void IColorData::SetColorData (int32 space,
const ColorArraycomponentArray 
)
pure virtual

Sets the color space and the corresponding color array.

Parameters
spacethe color space to set.
componentArraythe color array to set.
See Also
GraphicTypes.h
virtual void IColorData::SetColorSpace (int32 space)
pure virtual

Sets the color space. Color space can be one of kPMCsCalRGB, kPMCsCalCMYK, kPMCsLab, or kPMCsDeviceN.

See Also
GraphicTypes.h
Parameters
spacethe color space to set.
virtual void IColorData::SetConvertToHSB (bool16 convertToHSB)
pure virtual

Sets the value of convertToHSB flag as True if the colorspace set is HSB

Parameters
convertToHSBbool value to set