![]() | InDesign SDK 20.5 |
#include <IColorSystemUtils.h>

Public Types | |
| enum | { kDefaultIID = IID_ICOLORSYSTEMUTILS } |
Public Member Functions | |
| virtual PMString | GetColorInfoString (const int32 &colorSpace, const ColorArray &colorValueArray, bool16 doUseComma)=0 |
| virtual IPMUnknown * | QueryBaseRenderObject (IDataBase *iDataBase, UID renderObjectUID, PMIID iidToQuery=IID_IUNKNOWN)=0 |
| virtual IPMUnknown * | QueryBaseRenderObject (IPMUnknown *object, PMIID iidToQuery=IID_IUNKNOWN)=0 |
| virtual PMReal | GetTintValueFromSwatch (const UIDRef &swatchRef)=0 |
| virtual PMReal | GetTintValueFromColorObject (IPMUnknown *colorObject)=0 |
| virtual PMReal | GetCurrentActiveTintValue (IDataBase *iDataBase)=0 |
| virtual AGMColorSpace * | NewAGMColorSpace (int32 colorFamily, const ColorArray &colorArray, const UIDList *pInkUIDList, IInkList *iInkList=nil)=0 |
| virtual AGMColorSpace * | NewAGMColorSpaceFromColorSwatch (const UIDRef &swatchRef)=0 |
| virtual void | GetColorSpaceAndColorValue (bool16 doPrint, const UIDRef &swatchRef, const PMReal &tint, AGMColorSpace **colorSpace, float *colorValue, IGraphicsPort *gPort=nil)=0 |
| virtual void | ReleaseColorSpace (AGMColorSpace *colorSpace)=0 |
| virtual void | SetColorSpaceAndColorValue (IGraphicsPort *gPort, int32 colorFamily, const ColorArray &colorArray, const PMReal &tint, const UIDList *pInkUIDList=nil)=0 |
| virtual void | SetColorSpaceAndColorValue (IGraphicsPort *gPort, IColorData *iColorData, IColorData *iAltColorData, IInkData *iInkData, IColorOverrides *iCORides, IColorSpaceMgr *iCSMgr, const PMReal &tint)=0 |
| virtual ColorArray | ColorTransform (IDocument *iDoc, ColorArray srcArray, int32 srcColorSpace, int32 dstColorSpace, const UIDList *pInkUIDList=nil, IInkList *iInkList=nil)=0 |
| virtual ColorArray | GetTintedColorComponents (int32 colorSpace, ColorArray colorArray, PMReal tint)=0 |
| virtual void | GetColorSwatchColorSpaceAndValue (const UIDRef &colorRef, int32 &colorspace, ColorArray &colorArray, PMReal &tint)=0 |
| virtual bool32 | IsWhite (const UIDRef &swatchRef, PMReal tint=kDefaultTintPercent, bool32 useAltspaceOnly=kFalse)=0 |
| virtual bool32 | ShouldIgnorePaperColor (IViewPortAttributes *iAttr)=0 |
| virtual void | RGBToHSB (PMReal r, PMReal g, PMReal b, PMReal &h, PMReal &s, PMReal &v)=0 |
| virtual void | HSBToRGB (PMReal h, PMReal s, PMReal v, PMReal &r, PMReal &g, PMReal &b)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Utility for InDesign color rendering object.
| pure virtual |
Transform source color array to destination color array based on current document CMS setting. If iDoc is nil, the current front document is used.
| iDoc | specifies which the CMS setting should be used. |
| srcArray | is the source color array to be converted. |
| srcColorSpace | is the color space of the source color array. |
| dstColorSpace | is the color space to transform the source color to. |
| pInkUIDList | specifies the ink components for the source color array. |
| iInkList | specifies the IInkLIst for the ink components. Specify an IInkList if inks in pInkUIDList are not in the same database as the document or application database. |
| pure virtual |
Construct a string based on the color space and color value array. e.g. R=xx B=yy G=zz.
| colorSpace | specifies the color space to use. |
| colorValueArray | specifies the color values. |
| doUseComma | is kTrue then a comma is added after each component. |
| pure virtual |
Creates the color space and gets color value from the given color swatch UIDRef.
| doPrint | is kTrue if graphic port is a printer port. |
| swatchRef | specifies the UIDRef of the color swatch. |
| tint | specifies the tint percentage of the color swatch. |
| colorSpace | returns the AGMColorSpace for this swatch. |
| colorValue | returns the AGM color values for this swatch. |
| gPort | specifies the graphic port for this AGMColorSpace. |
| pure virtual |
Get the specified color swatch's color space and color array. If color swatch is a tint swatch, the tint percent is returned otherwise returns kDefaultTintPercent.
| colorRef | specifies the color swatch UIDRef to get the color information from. |
| colorspace | returns the swatch's color space. |
| colorArray | returns the swatch's color component array. |
| tint | returns the swatch's tint value. If not a tint swatch, kDefaultTintPercent is returned.. |
Return tint percentage of the given database's active fill or stroke attribute depending on whether fill or stroke proxy is active.
| iDataBase | specifies the data base. |
| pure virtual |
Compute the tinted color components given a base color array and a tint percent between 0 and 100 percent.
| colorSpace | is the color space of the color value. |
| colorArray | is the color values |
| tint | is the tint percentage in the range [0, 100]. |
| pure virtual |
Return the specified color object's tint value. tint is kInvalidTintPercent if swatch does not have a tint value or if swatch is not a color swatch.
| colorObject | specifies the color object. |
Return the specified swatch's tint value. tint is kInvalidTintPercent if swatch does not have a tint value or if swatch is not a color swatch.
| swatchRef | specifies the UIDRef of the swatch. |
| pure virtual |
HSBToRGB() a utility function to convert the HSBColor Values to their corresponding RGBColor Values. HSB is also known as HSV, argument name uses v instead of b to not to conflict with b of rgb.
| pure virtual |
Returns true iff the color is white – that is, that the color will not mark any plate with a nonzero value.
| swatchRef | is the swatch you're curious about. |
| tint | is the tint to apply. If the swatch is a tint swatch then the two tints multiply. |
| useAltspaceOnly | If true, non-process colors (spots and deviceN) are effectively converted to process; that is, their altspace value is used rather than considering contribution on plates. Note that this only makes a difference if a spot is defined as white. |
| pure virtual |
Creates and returns the AGM color space from the specified color and ink data. This version does not take any view port attribute into consideration. It uses the default CMS off settings. It assumed the target graphic port is screen.
| colorFamily | specifies the color space. |
| colorArray | specifies color value. |
| inkUIDList | specifies the ink components for this color. |
| pure virtual |
Creates and returns the AGM color space from the specified color swatch UIDRef. This version ignores the view port settings. It uses the default CMS off settings. It assumed the target graphic port is screen. To accurately reflect the current port settings, use GetColorSpaceAndColorValue()
| swatchRef | specifies the UIDRef of the color swatch. |
| pure virtual |
Query for the base rendering object's interface
| iDataBase | the database of the object to use. |
| renderObjectUID | specifies the object's UID. |
| iidToQuery | is the PMIID to query. |
| pure virtual |
Query for the base rendering object's interface
| object | specifies the object to query. |
| iidToQuery | is the PMIID to query. |
| pure virtual |
Release the AGMColorSpace. This is the AGMColorSpace created from GetAGMColorSpace, GetAGMColorSpaceFromColorSwatch, and GetColorSpaceAndColorValue().
| colorSpace | specifies the AGMColorSpace to be released. |
| pure virtual |
RGBToHSB() a utility function to convert the RGBColor Values to their corresponding HSBColor Values. HSB is also known as HSV, argument name uses v instead of b to not to conflict with b of rgb.
| pure virtual |
Set the color value and color space specified by colorFamily and colorArray in the given port. This version ignores the view port settings. It uses the default CMS off settings. It assumed the target graphic port is screen. To accurately reflect the color in the graphics port, use the version which specifies the complete color data.
| gPort | specifies the graphic port for this AGMColorSpace. |
| IColorData | specifies the color data. |
| tint | specifies the tint percentage of the color swatch. |
| inkUIDList | specifies the ink components for this color. |
| pure virtual |
Set the color value and color space in the given port. This version is only called from within the implementation of ColorRenderingObject.
| gPort | specifies the graphic port for this AGMColorSpace. |
| IColorData | specifies the color data. |
| iAltColorData | specifies the alternate color data. |
| iInkData | specifies the ink data. |
| iCORides | specifies the color overrides data. |
| iCSMgr | specifies the color managment manager to use. |
| tint | specifies the tint percentage of the color object. |
| pure virtual |
Returns true iff, given the viewport attributes, the paper swatch should be represented by CMYK white (or whatever other paper strategy is appropriate for the port) as opposed to its native color as defined in the swatch list. At present this returns true when printing, when previewing overprint, or when proofing with paper white; but it may be more sophisticated in the future.
| iAttr | The view port attributes to inspect. |