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

Public Member Functions | |
| virtual PMString | GetUniqueSwatchName (ISwatchList *swatchList, const PMString &baseName, const PMString &suffixString, bool16 doAppendSuffix=kTrue, bool16 doTruncateNumber=kTrue, SwatchUtilsUniqueNameTempCache *pCache=nil)=0 |
| virtual PMString | FormatSwatchNameWithColorValue (ISwatchList *swatchList, int32 colorspace, const ColorArray &colorValue, bool16 doUseComma)=0 |
| virtual ISwatchList * | QueryActiveSwatchList (IActiveContext *context=nil)=0 |
| virtual ISwatchList * | QuerySwatchList (IDataBase *iDataBase)=0 |
| virtual UID | CreateNewSwatch (ClassID renderClassID, const IPMUnknown *newRenderObject, IDataBase *iDataBase, bool16 updateGfxState=kTrue, int32 nSwatchFlags=kNoFlags, const UID &colorGroup=kInvalidUID)=0 |
| virtual UID | CreateNewSwatch (ClassID renderClassID, const IPMUnknown *newRenderObject, IWorkspace *workspacePtr, bool16 updateGfxState=kTrue, int32 nSwatchFlags=kNoFlags, const UID &colorGroup=kInvalidUID)=0 |
| virtual UIDList | DuplicateSwatches (const UIDList &dupList, ISwatchList *swatchList, bool16 makeHidden, bool16 convertToProcess, bool16 doCheck, ISwatchUtils::DuplicatePref dupPref=kDoDuplicate, const PMString &nameSuffixString=PMString(""), bool16 doConvert=kFalse, bool16 doUnlock=kFalse, int32 nFlags=kNoFlags)=0 |
| virtual ErrorCode | ReplaceAndDeleteSwatches (UIDList *selectedList, UID replacementUID)=0 |
| virtual ErrorCode | ConvertAndDeleteSwatches (UIDList *selectedList)=0 |
| virtual bool16 | ConvertToGlobalColorSwatch (ISwatchList *iSwatchList, const UID &originalUID, UID &newUID)=0 |
| virtual void | GetAllDependentSwatches (ISwatchList *iSwatchList, const UIDList &fromList, UIDList &dependentList)=0 |
| virtual void | GetAllDependentColorSwatchesAndTintValues (ISwatchList *iSwatchList, const UIDList &fromList, UIDList &dependentList, K2Vector< PMReal > &tintList)=0 |
| virtual void | GetAllMixedInkParentSwatches (ISwatchList *iSwatchList, UIDList &mixedInkParentList)=0 |
| virtual void | GetDependentMixedInkSwatches (ISwatchList *iSwatchList, const UIDRef &mixedInkParentRef, UIDList &mixedInkList)=0 |
| virtual UID | CreateTintedSwatch (const UIDRef &srcSwatch, const PMReal &tintval, const UID &colorGroup=kInvalidUID)=0 |
| virtual UID | CreateProcessCMYKSwatch (IWorkspace *workspacePtr, const PMString &swatchName, const PMReal &cyanVal, const PMReal &magentaVal, const PMReal &yellowVal, const PMReal &blackVal, const UID &colorGroup=kInvalidUID)=0 |
| virtual UID | CreateProcessRGBSwatch (IWorkspace *workspacePtr, const PMString &swatchName, const PMReal &redVal, const PMReal &greenVal, const PMReal &blueVal, const UID &colorGroup=kInvalidUID)=0 |
| virtual UID | CreateProcessLABSwatch (IWorkspace *workspacePtr, const PMString &swatchName, const PMReal &LVal, const PMReal &aVal, const PMReal &bVal, const UID &colorGroup=kInvalidUID)=0 |
| virtual UID | CreateProcessHSBSwatch (IWorkspace *workspacePtr, const PMString &swatchName, const PMReal &hueVal, const PMReal &satVal, const PMReal &briVal, const UID &colorGroup=kInvalidUID)=0 |
| virtual UID | CreateSpotCMYKSwatch (IWorkspace *workspacePtr, const PMString &swatchName, const PMReal &cyanVal, const PMReal &magentaVal, const PMReal &yellowVal, const PMReal &blackVal, const UID &colorGroup=kInvalidUID)=0 |
| virtual UID | CreateSpotRGBSwatch (IWorkspace *workspacePtr, const PMString &swatchName, const PMReal &redVal, const PMReal &greenVal, const PMReal &blueVal, const UID &colorGroup=kInvalidUID)=0 |
| virtual UID | CreateSpotLABSwatch (IWorkspace *workspacePtr, const PMString &swatchName, const PMReal &LVal, const PMReal &aVal, const PMReal &bVal, const UID &colorGroup=kInvalidUID)=0 |
| virtual UID | CreateSpotHSBSwatch (IWorkspace *workspacePtr, const PMString &swatchName, const PMReal &hueVal, const PMReal &satVal, const PMReal &briVal, const UID &colorGroup=kInvalidUID)=0 |
| virtual ErrorCode | ReplaceColorSwatchDefinition (const UIDRef &swatchRef1, const UIDRef &swatchRef2, int32 nFlags=kNoFlags)=0 |
| virtual ErrorCode | ReplaceGradientSwatchDefinition (const UIDRef &, const UIDRef &)=0 |
| virtual bool16 | SyncMixedInkSwatchesColorData (IDataBase *iSrcDB, IDataBase *iTargetDB, IRenderingObject *iSrcRenderObject, IRenderingObject *iTargetRenderObject, ColorArray &newComponents)=0 |
| virtual bool16 | TintColorSwatchAlreadyExists (const UID &baseObjectUID, const PMReal &tint, ISwatchList *swatchList=nil, UIDRef *matchedRef=nil)=0 |
| virtual bool16 | SwatchIsGlobalSwatch (IDataBase *iDataBase, UID swatchUID)=0 |
| virtual bool16 | SwatchIsVisible (IDataBase *iDataBase, UID swatchUID)=0 |
| virtual bool16 | SwatchIsLocked (IDataBase *, UID)=0 |
| virtual UID | GetSwatchAliasUID (IDataBase *, UID)=0 |
| virtual bool16 | SwatchIsReservedSwatch (IDataBase *, UID)=0 |
| virtual bool16 | SwatchIsSpotColorSwatch (const UIDRef &swatchRef)=0 |
| virtual bool16 | SwatchIsBasedOnSwatch (const UIDRef &swatchRef)=0 |
| virtual bool16 | SwatchIsTintSwatch (const UIDRef &swatchRef, UID *pBaseUID=nil)=0 |
| virtual bool16 | SwatchIsMixedInkSwatch (const UIDRef &swatchRef, UID *pParentUID=nil)=0 |
| virtual bool16 | SwatchIsMixedInkGroupParent (const UIDRef &swatchRef)=0 |
| virtual bool16 | SpotSwatchIsConvertedToProcess (const UIDRef &swatchRef)=0 |
| virtual SwatchType | GetSwatchType (const UIDRef &swatchRef, UID *pBaseUID=nil)=0 |
| virtual UID | GetBaseObjectUIDFromSwatch (const UIDRef &swatchRef)=0 |
| virtual UID | GetNoneSwatchUID (IDataBase *iDataBase)=0 |
| virtual UID | GetBlackSwatchUID (IDataBase *iDataBase)=0 |
| virtual UID | GetPaperSwatchUID (IDataBase *iDataBase)=0 |
| virtual UID | GetRegistrationSwatchUID (IDataBase *iDataBase)=0 |
| virtual UID | GetNamedSwatch (const PMString &swatchName, IDataBase *iDataBase=nil)=0 |
| virtual PMString | GetSwatchName (IDataBase *iDataBase, UID swatchUID)=0 |
| virtual UIDList | GetAllTintSwatchUIDListOfSwatch (IDataBase *iDataBase, UID swatchUID)=0 |
| virtual ISwatchUtils::ActionCode | CheckSwatchBeforeCopy (const UIDRef &swatchRef, ISwatchList *swatchList, bool16 doAlertUser, ISwatchUtils::DuplicatePref dupPref, UIDRef &matchedRef, ISwatchUtils::CompareCode &resultCode)=0 |
| virtual void | SynchronizeTintsOfAliasedSwatchOldAndNew (ISwatchList *iSwatchList, const UIDRef &swatchRef, UID newUID)=0 |
| virtual void | SynchronizeAliasedSwatchInkDataOldAndNew (ISwatchList *iSwatchList, const UIDRef &swatchRef, UID newUID)=0 |
| virtual void | ProcessMakeSwatchAliasCommand (ISwatchList *iSwatchList, UID swatchUID, UID aliasSwatchUID)=0 |
| virtual UID | HandleAlternateSwatchMatch (const UIDRef &srcSwatchRef, ISwatchList *iSwatchList, const UIDRef &altSwatchRef, ISwatchUtils::ActionCode actionCode, ISwatchUtils::CompareCode resultCode)=0 |
| virtual UID | HandleAlternateSwatchMatch (ISwatchList *iSwatchList, const UIDRef &altSwatchRef, const PMString &, const PMString &, int32, const ColorArray &, const IInkData::InkType &, bool16, ISwatchUtils::ActionCode)=0 |
| virtual ISwatchUtils::ActionCode | CancelDuplicateSpotColorSwatchAlert ()=0 |
| virtual ISwatchUtils::ActionCode | InvokeSameSwatchAlert (const ISwatchUtils::CompareCode &compareResult, PMString swatchName, bool16 isSpot=kFalse, bool16 allowCancel=kTrue, PMString alternateName=PMString(""))=0 |
| virtual UID | HandlePlacedContentSpotSwatch (ISwatchList *iSwatchList, const PMString &colorName, int32 colorSpace, const ColorArray &colorArray)=0 |
| virtual UIDRef | ConvertLibraryColorSwatchToK2Swatch (const UIDRef &libSwatchRef, IWorkspace *iDestinationWS, bool16 doCheckForConflicts, bool16 doUpdateGfxState, int32 nSwatchFlags=kNoFlags, const UID &colorGroup=kInvalidUID)=0 |
| virtual UIDRef | ConvertLibraryGradientSwatchToK2Swatch (const UIDRef &libSwatchRef, IWorkspace *iDestinationWS, UIDList *pNewColorUIDList, bool16 doCheckForConflicts, bool16 doUpdateGfxState)=0 |
| virtual UID | AddBookSwatch (ISwatchList *iSwatchList, const UIDRef &bookRef, int32 swatchIndex, const PMString &swatchName, bool16 doLockSwatch, const UID &colorGroup=kInvalidUID)=0 |
| virtual PMString | GetAlternatePanetoneSwatchName (const PMString &swatchName)=0 |
| virtual ISwatchUtils::SwatchNameMatchType | FindAlternateSwatchName (ISwatchList *iSwatchList, const PMString &swatchName, UIDRef &altSwatchRef, PMString *pAlterateName=nil)=0 |
| virtual PMString | GetAlternatePanetoneSwatchNameSuffix (const PMString &pantoneSuffixString)=0 |
| virtual ErrorCode | ConvertSwatchProfile (ISwatchList *pSwatchList, const UIDList &listSrcColors, UIDList &listDstColors, IDataBase *pDstDB)=0 |
| virtual ActionCode | CheckProfilesBeforeCopy (ActionCode inActionCode, bool16 inDoAlertUser, const UIDRef &inSrcSwatchRef, ISwatchList *inDstSwatchList, UIDRef &refMatched, bool16 bAllowCancel=kTrue)=0 |
| virtual bool16 | SwatchIsUsed (IDataBase *iDataBase, UID swatchUID, ISwatchUtils::SwatchUsageType usageType)=0 |
| virtual void | GetSwatchReferences (IDataBase *iDataBase, UIDList &referencedList, UIDList &unusedList, bool16 includeVisibleSwatches, bool16 includeUnnamedSwatches, ISwatchUtils::SwatchUsageType usageType)=0 |
| virtual void | GetSwatchReferencesByObject (const UIDRef &objectUIDRef, UIDList &referencedList)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Swatch related utility
Use to specify the desired action resulting from CheckSwatchBeforeCopy()
Use to specify the swatch mathcing result from CheckSwatchBeforeCopy()
Use to specify the duplicate swatch preference.
A new set of bitflags that can be be passed to the various duplicate/replace swatch functions.
Use to specify the type of swatch.
Use to specify the type of swatch.
| pure virtual |
Add a swatch from the Adobe swatchbook to the specified swatch list.
| iSwatchList | is the swatch list the swatch is being added to. |
| bookRef | is the swatchbook from swatch the swatch is being added. |
| swatchIndex | is the index in the swatchbook. |
| swatchName | if not empty, set the new swatch with this name. Otherwise leave swatch name as is. |
| doLockSwatch | if set to kTrue, the new swatch is locked. |
| colorGroup | the UID of the parent color group for the new swatch. |
| pure virtual |
Bring up a duplicate spot color swatch alert.
| pure virtual |
Check profile before copy to determine if swatch profiles should be converted.
| inActionCode | the initial action code. |
| inDoAlertUser | kTrue if allow to put up an user alert dialog. |
| inSrcSwatchRef | the source swatch to check. |
| inDstSwatchList | the target swatch list. |
| refMatched | the matching swatch UIDRef found in the target swatch list. |
| bAllowCancel | kTrue if user can cancel. |
| pure virtual |
Return an action code, a compare result, and a matching UIDRef if one is found based on the swatch's compare result.
| swatchRef | the source swatch to check. |
| swatchList | the target swatch list to check. |
| doAlertUser | if kTrue, a warning alert is shown when there's conflict. A conflict exists if two swatches have same name but different data. |
| dupPref | specifies the duplicate preference. |
| matchedRef | returns a UIDRef of the matching swatch found in the target swatchList. |
| resultCode | returns the compare result code. |
| pure virtual |
Deletes all swatches in the list after replacing all references to these swatches with equivalent unnamed local swatches
| selectedList | the list of swatch UID to delete. Reserved swatches in the lsit are not deleted. |
| pure virtual |
Convert a swatch library color swatch to an InDesign color swatch.
| libSwatchRef | specifies the UIDRef of the library swatch. |
| iDestinationWS | specifies the target workspace to create the new InDesign swatch. |
| doCheckForConflicts | is kTrue, if CheckSwatchBeforeCopy() should be called. |
| doUpdateGfxState | is kTrue, if the graphic state should be updated with the new swatch. |
| nSwatchFlags | a combination of SwatchFlags. |
| colorGroup | the UID of the parent color group for the new InDesign color swatch. |
| pure virtual |
Convert a swatch library gradient swatch to an InDesign gradient swatch.
| libSwatchRef | specifies the UIDRef of the library swatch. |
| iDestinationWS | specifies the target workspace to create the new InDesign swatch. |
| pNewColorUIDList | returns the list of new color UID created for this gradient swatch. |
| doCheckForConflicts | is kTrue, if CheckSwatchBeforeCopy() should be called. |
| doUpdateGfxState | is kTrue, if the graphic state should be updated with the new swatch. |
| pure virtual |
Convert swatches' profiles. Only RGB and CMYK color spaces are converted.
| pSwatchList | the target swatch list. |
| listSrcColors | the list of source color swatches. |
| listDstColors | the list of corresponding target color swatches. |
| pDstDB | the target database. |
| pure virtual |
Convert the specified unnamed color swatch to the equivalent named with color value swatch.
| originalUID | the unnamed color swatch to convert. |
| newUID | the converted global color swatch. This swatch is named with color values. |
| pure virtual |
Create a new swatch matching the attributes described by the newRenderObject exactly in the given workspace or database. Update graphic state in the specified workspace or database to the new swatch when updateGfxState is set to kTrue.
| renderClassID | rendering class ID of the new rendering object. |
| newRenderObject | specifies the new rendering attributes matching the renderClassID. |
| iDataBase | the target data base to create the new swatch. |
| workspacePtr | the target workspace to create the new swatch. |
| updateGfxState | if kTrue, the graphic state of the specified workspace or database is updated with this new swatch UID. |
| nSwatchFlags | a combination of SwatchFlags. See SwatchFlags above. |
| colorGroup | the UID of the parent color group for the new swatch. |
| pure virtual |
| pure virtual |
Creates a new process CMYK color swatch in the workspacePtr using the passed in values.
| workspacePtr | the workspace of the new process color swatch. |
| swatchName | specifies the new swatch name. |
| cyanVal | specifies the cyan component value. |
| magentaVal | specifies the magenta component value. |
| yellowVal | specifies the yellow component value. |
| blackVal | specifies the black component value. |
| colorGroup | the UID of the parent color group for the new process color swatch. |
| pure virtual |
Creates a new process HSB color swatch in the workspacePtr using the passed in values.
| workspacePtr | the workspace of the new process color swatch. |
| swatchName | specifies the new swatch name. |
| hueVal | specifies the hue component value. |
| satVal | specifies the saturation component value. |
| briVal | specifies the brightness component value. |
| colorGroup | the UID of the parent color group for the new process color swatch. |
| pure virtual |
Creates a new process Lab color swatch in the workspacePtr using the passed in values.
| workspacePtr | the workspace of the new process color swatch. |
| swatchName | specifies the new swatch name. |
| LVal | specifies the L component value. |
| aVal | specifies the A component value. |
| bVal | specifies the B component value. |
| colorGroup | the UID of the parent color group for the new process color swatch. |
| pure virtual |
Creates a new process RGB color swatch in the workspacePtr using the passed in values.
| workspacePtr | the workspace of the new process color swatch. |
| swatchName | specifies the new swatch name. |
| redVal | specifies the red component value. |
| greenVal | specifies the green component value. |
| blueVal | specifies the blue component value. |
| colorGroup | the UID of the parent color group for the new process color swatch. |
| pure virtual |
Creates a new spot CMYK color swatch in the workspacePtr using the passed in values.
| workspacePtr | the workspace of the new spot color swatch. |
| swatchName | specifies the new swatch name. |
| cyanVal | specifies the cyan component value. |
| magentaVal | specifies the magenta component value. |
| yellowVal | specifies the yellow component value. |
| blackVal | specifies the black component value. |
| colorGroup | the UID of the parent color group for the new spot color swatch. |
| pure virtual |
Creates a new spot HSB color swatch in the workspacePtr using the passed in values.
| workspacePtr | the workspace of the new spot color swatch. |
| swatchName | specifies the new swatch name. |
| hueVal | specifies the hue component value. |
| satVal | specifies the saturation component value. |
| briVal | specifies the brightness component value. |
| colorGroup | the UID of the parent color group for the new spot color swatch. |
| pure virtual |
Creates a new spot Lab color swatch in the workspacePtr using the passed in values.
| workspacePtr | the workspace of the new spot color swatch. |
| swatchName | specifies the new swatch name. |
| LVal | specifies the L component value. |
| aVal | specifies the A component value. |
| bVal | specifies the B component value. |
| colorGroup | the UID of the parent color group for the new spot color swatch. |
| pure virtual |
Creates a new spot RGB color swatch in the workspacePtr using the passed in values.
| workspacePtr | the workspace of the new spot color swatch. |
| swatchName | specifies the new swatch name. |
| redVal | specifies the red component value. |
| greenVal | specifies the green component value. |
| blueVal | specifies the blue component value. |
| colorGroup | the UID of the parent color group for the new spot color swatch. |
| pure virtual |
Creates a tinted color swatch. This will return a kInvalidUID if the source swatch is not a color. If tint of that swatch already exists, it will return the existing tint swatch UID.
| srcSwatch | the base swatch from which to create the new tint swatch. |
| tintval | the tint value of the new tint swatch. |
| colorGroup | the UID of the parent color group for the new tint swatch. |
| pure virtual |
Duplicate the swatches specified by the dupList in the specified swatchList. If swatchList is nil, the source swatch list is used.
| dupList | specifies a list of swatch UID to duplicate. |
| swatchList | the target swatch list to create the duplicates. |
| makeHidden | if kTrue, the resulting duplicates is converted to unnamed swatches. |
| convertToProcess | if kTrue, the resulting duplicates that are color swatches are converted to process color swatches. |
| doCheck | if kTrue, call CheckSwatchBeforeCopy() first. |
| dupPref | used by the reference converter to determine what to do if an existing swatch matches the one to be duplicated. |
| nameSuffixString | the string to append to duplicated swatch name. if string is empty, the new name will just be the duplicated name with a numeric value |
| doConvert | if kTrue color values are converted using source and destination document color profiles |
| doUnlock | if kTrue locked swatches are unlocked. |
| nFlags | a combination of SwatchFlags. See SwatchFlags above. |
| pure virtual |
Find the alternate swatch in the specified target swatch list.
| iSwatchList | the target swatch list. |
| swatchName | the PANTONE swatch name to check. |
| altSwatchRef | returns the alternate swatch UIDRef found. This is UIDRef::gNull if no alternate found. |
| pAlterateName | returns the alternate swatch name if not nil. |
| pure virtual |
Format a swatch name from the given color space and value. For example, if the color space is CMYK and value is (0,100, 20, 0), the swatch name is "C=0, M=100, Y=20, K=0". If a swatch name with this string already exists, the string is appended a number starting with "2".
| swatchList | the swatch list in which the swatch name should be unique. |
| colorspace | the colorspace to format swatch name with. |
| colorValue | the color value to format swatch name with. |
| doUseComma | if kTrue, the comman "," is used with a space separator. |
| pure virtual |
Compile a list of color swatches UIDs and tint values that are dependent of the base swatches in the fromList.
| iSwatchList | the swatch list to gather information from. |
| fromList | the list of base color swatch UID. |
| dependentList | the resulting list of tint swatch UIDs that are tint of swatches in the fromList |
| tintList | the list of tint values corresponding to the dependentList. |
| pure virtual |
Compile a list of swatch UIDs that are dependents of swatches in the fromList.
| iSwatchList | the swatch list to gather information from. |
| fromList | the list of base swatch UID. |
| dependentList | the resulting list of swatch UIDs that are dependent of swatches in the fromList. This list can include tint swatches as well as mixed ink group swatches. |
| pure virtual |
Compile a list of mixed ink parent swatches from the specified swatch list.
| iSwatchList | the target swatch list. |
| mixedInkParentList | returns a list of mixed ink parent swatchUID. |
| pure virtual |
Return a list of tint swatch UID that is based on the specified color swatch UID
| iDataBase | the database of the specified swatch UID. |
| swatchUID | specifies the swatch |
| pure virtual |
Returns the alternate PANTONE swatch name corresponding to the specified swatch name.
| swatchName | the PANTONE swatch name to check. |
| pure virtual |
Get the alternate PANTONE swatch name's suffix string
| pantoneSuffixString | specifies the PANTONE swatch name suffix string to check. |
Return swatch's base object UID. UID is kInvalidUID if swatch is not based on another swatch.
| swatchRef | the UIDRef of the swatch to check. |
Return the Black swatch UID of the specified database.
| iDataBase | the database to check. |
| pure virtual |
Returns a list of mixed ink swatches that are linked to the specified parent swatch.
| iSwatchList | the target swatch list. |
| mixedInkParentRef | specifies the mixed ink parent swatch UID. |
| mixedInkList | returns a list of mixed ink swatch UIDs that are linked to mixedInkParentRef. Returns an empty list if mixedInkParentRef is not mixed ink parent swatch. |
| pure virtual |
Get the named swatch's UID from the specified database. If database is nil, it returns the named swatch UID in the current active workspace.
| name | the swatch name. |
| iDataBase | the database to check. |
Return the None swatch UID of the specified database.
| iDataBase | the database to check. |
Return the Paper swatch UID of the specified database.
| iDataBase | the database to check. |
Return the Registration swatch UID of the specified database.
| iDataBase | the database to check. |
Return the specified swatch's aliase swatch UID. If the swatch is not aliased, then kInvalidUID is returned.
| iDataBase | the database of the swatch UID to check. |
| swatchUID | the swatch UID to check. |
Given the UIDRef, return the swatch name.
| iDataBase | the database to check. |
| swatchUID | the swatch UID. |
| pure virtual |
Return a list of swatch UIDs that are used in the database.
| iDataBase | is the database. |
| referencedList | the list containing the used swatch UIDs. |
| unusedList | the list containing the used swatch UIDs. |
| includeVisibleSwatches | if true visible swatches are included in the referencedList and the unusedList. If false, visible swatches are excluded. |
| includeUnnamedSwatches | if true unnamed swatches are included in the referencedList and the unusedList. If false, unnamed swatches are excluded. If both includeVisibleSwatches and includeUnnamedSwatches are true, all swatches are included. If both are false, then nothing is don, i.e. both referencedList and unusedList are returned as empty lists. |
| usageType | is the type of references wanted. |
| pure virtual |
Return a list of swatch UIDs that are referenced by the specified object.
| objectUIDRef | is the object the swatch references are being returned. |
| referencedList | the list containing the used swatch UIDs. |
| pure virtual |
Return the swatch type of the specified swatch. If a tint swatch is based on a mixed ink swatch, the swatch type returned will be kTintColor and the base UID will be the mixed ink swatch.
| swatchRef | the UIDRef of the swatch to check. |
| pBaseUID | the base color UID if the swatch is based on another swatch. |
| pure virtual |
Get an unique swatch name starting with "baseName". If the baseName is already unique, this is returned.
| swatchList | the swatch list in which the name should be unique. |
| baseName | the base name to start with. |
| suffixString | the string to append to baseName if not empty. |
| doAppendSuffix | if set to kTrue, then suffixString is append. |
| doTruncateNumber | if set to kTrue, the existing number appended to baseName will be removed first. |
| vecExistingSuffixes | if you are calling GetUniqueSwatchName many times repeatedly for the same base name, this will act as a cache and significantly improve performance. If nil, it is ignored. |
| pure virtual |
Handle the user actions resulting from a pantone color swatch alternate match in the target swatch list. Both source and matched swatch must be a color.
| srcSwatchRef | the source (original) panetone swatch. |
| iSwatchList | the target swatch list. |
| altSwatchRef | the matched alternate swatch UIDRef found in swatchList. |
| actionCode | the desired action code. |
| resultCode | specifies the result code. This must be kAlternatePantoneName. |
| pure virtual |
Handle the user actions resulting from a pantone color swatch alternate match in the target swatch list. In this version, the source must be a color swatch specified by its swatch name, color space, color values, ink type, and whether or not it must be locked.
| iSwatchList | the target swatch list. |
| altSwatchRef | the matched alternate swatch UIDRef found in swatchList. |
| swatchName | the source (original) panetone swatch name. |
| alternateSwatchName | the alternate panetone swatch name. |
| colorspace | the source (original) panetone swatch color space. |
| colorArray | the source (original) panetone swatch color value. |
| inkType | the source (original) panetone swatch ink type. |
| lockedSwatch | specified if source swatch is locked. |
| actionCode | the desired action code. |
| pure virtual |
This utility encapsulates the tricky business of taking spot plates coming from placed content (PDF, EPS, images) and matching up to or creating new swatches in the document. Specifically it does one of the following depending on the name of the spot.
If the spot name matches a reserved ink name it simply returns the UID of the reserved ink. If the spot name matches an existing spot color in the document exactly then it locks that spot and returns its UID. No alert is given if the definition doesn't match, per the current spot functional specification. The existing document definition always wins. If the spot name matches a book color *and* an existing swatch in the document also matches the same book color (e.g., one is PANTONE 185 CVC and the other is PANTONE 185 C) then the new spot is aliased to the existing spot and the existing spot is locked. So, again, the document definition always wins if it exists. If the spot name matches a current book color but that color (or a name variant) doesn't exist in the document, the book definition is added to the swatch list and its UID is returned. Note that the color space/array coming is irrelevant in this case; the book definition always wins (per the spot spec). However, the name from the linked content is used even if it differs from the book name (e.g., if the placed content uses PANTONE 185 CVC, it will retain that name, but the values will come from the book). If the spot name doesn't match any existing document colors, nor a book color (current or legacy) then it's a custom spot. A new swatch is added to the swatch list with the name and color values specified and that swatch is locked. Its UID is returned.
| iSwatchList | The swatch list to which swatches are compared and/or added. |
| swatchName | The name of the swatch as specified in the placed content. |
| colorSpace | The kPMCs* colorspace of the spot's alternate. |
| colorArray | The array of color values in spot alt space. |
| pure virtual |
Bring up a alert indicating duplicating a color swatch.
| compareResult | specifies either swatch compare is kSameNameSameData or kSameNameDiffData. |
| swatchName | specifies the swatch name. |
| isSpot | is kTrue if swatch is a spot color swatch. |
| allowCancel | if kTrue, the allow the action to be cancelled. |
| resultCode | specifies the result code. This must be kAlternatePantoneName. |
| pure virtual |
Process a command to create a swatch alias
| swatchList | the target swatch list. |
| swatchUID | the swatch to be aliased |
| aliasSwatchUID | the swatch UID that swatchUID will be aliased to. |
| pure virtual |
Query for the current active swatch list in the specified context. If the context is nil, the current active context is used.
| context | the active context to use. |
| pure virtual |
Query for the swatch list of the given database.
| iDataBase | the database to use |
| pure virtual |
Delete all swatches in the list after replacing all references to these swatches with the replacement swatch.
| selectedList | the list of swatch UID to delete. Reserved swatches in the lsit are not deleted. |
| replacementUID | the replacement swatch UID. |
| pure virtual |
Process a command to replace the definition of color swatch 1 with the definition from color swatch 2. Swatch 1 and 2 do not have to be in the same data base. However swatch 1 and 2 must be of the same rendering type.
| swatchRef1 | the UIDRef of swatch 1. |
| swatchRef1 | the UIDRef of swatch 2. |
| nFlags | a combination of SwatchFlags. |
| pure virtual |
Process a command to replace the gradient swatch 1 with the definition from gradient swatch 2. Swatch 1 and 2 do not have to be in the same data base. However swatch 1 and 2 must be of the same rendering type.
| pure virtual |
Return true if the given spot swatch has been converted to process. It will also return true if swatchRef is not spot, but a process swatch.
| swatchRef | the UIDRef of the swatch to check. |
| pure virtual |
Return true if the given swatch is based on another swatch. For example, a tint swatch is based on another swatch.
| swatchRef | the UIDRef of the swatch to check. |
| pure virtual |
Reutrn true if the given swatch is a global swatch. A global swatch is a named and visible swatch.
| iDataBase | the database of the swatch UID to check. |
| swatchUID | the swatch UID to check. |
Return true if the given swatch is locked. A swatch is locked if it cannot be deleted.
| iDataBase | the database of the swatch UID to check. |
| swatchUID | the swatch UID to check. |
| pure virtual |
Return true if the given swatch is a mixed ink group parent swatch.
| swatchRef | the UIDRef of the swatch to check. |
| pure virtual |
Return true if the given swatch is a mixed ink swatch.
| swatchRef | the UIDRef of the swatch to check. |
| pParentUID | the mixed ink group parent UID if the swatch is part of the mixed ink group. |
Return true if the given swatch is one of reserved Cyan, Magenta, Yellow, Paper, Black, Registration, or None.
| iDataBase | the database of the swatch UID to check. |
| swatchUID | the swatch UID to check. |
| pure virtual |
Return true if the given swatch is a spot color swatch. Will also return kTrue if tint swatch is a tint of a spot.
| swatchRef | the UIDRef of the swatch to check. |
| pure virtual |
Return true if the given swatch is a tint swatch swatch.
| swatchRef | the UIDRef of the swatch to check. |
| pBaseUID | the base color UID the tint swatch is based on. |
| pure virtual |
Return kTrue if swatchUID is used in the database.
| iDataBase | is the database. |
| swatchUID | is the swatchUID to test. |
| usageType | is the type of references wanted for this swatch. |
Return true if the given swatch is visible in the list.
| iDataBase | the database of the swatch UID to check. |
| swatchUID | the swatch UID to check. |
| pure virtual |
A utility function to synchronize aliased swatch's ink data from old to new.
| swatchList | the target swatch list. |
| swatchRef | the original swatch alias UID. |
| newUID | the new swatch alias UID. |
| pure virtual |
A utility function to synchronize tint swatches of aliased swatch from old alias to new alias.
| swatchList | the target swatch list. |
| swatchRef | the original swatch alias UID. |
| newUID | the new swatch alias UID. |
| pure virtual |
Reutrn true and the target's color components are sync to the same order as source if two rendering objects are mixed ink swatches and they are equivalent. They are equivalent if they are exactly equal or if their ink lists contains same inks though inks may not appear in the same order and ink contribution data are the same. Otherwise, it returns kFalse and newComponents is cleared.
| iSrcDB | the database of the source mixed ink rendering object. |
| iTargetDB | the database of the source mixed ink rendering object. |
| iSrcRenderObject | the source mixed ink rendering object. |
| iTargetRenderObject | the target mixed ink rendering object. |
| newComponents | the color components of target in the order of source ink list. |
| pure virtual |
Reutrn true if the given swatch and tint value already exists in the swatch list.
| baseObjectUID | the base color swatch UID. |
| tint | the tint value to check. |
| swatchList | specifies the swatch list of the baseObjectUID |
| matchedRef | if not nil, the matched tint swatch UID is returned. |