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

Public Types | |
| enum | { kDefaultIID = IID_IPREFLIGHTARTWORKCSINFO } |
| enum | Type { kCS_Invalid, kCS_Other, kCS_Gray, kCS_RGB, kCS_CMYK, kCS_LAB, kCS_NChannel, kCS_DeviceN, kCS_Indexed, kCS_Pattern, kCS_HSB } |
| enum | ChannelType { kChannelTypeProcess, kChannelTypeSpot, kChannelTypeRegistration, kChannelTypeCMYKInDeviceN, kChannelTypeAlpha, kChannelTypeInvalid } |
Public Member Functions | |
| virtual void | Initialize (CAGMColorSpace &cs)=0 |
| virtual Type | GetType () const =0 |
| virtual IPreflightArtworkCSInfo * | QueryBase () const =0 |
| virtual IPreflightArtworkCSInfo * | QueryProcess () const =0 |
| virtual IPreflightArtworkCSInfo * | QueryCSWithAlphaState (bool alpha) const =0 |
| virtual IPreflightArtworkCSInfo * | QueryCSRasterPortSafe (bool alpha) const =0 |
| virtual uint32 | GetNumChannels () const =0 |
| virtual const K2Vector< int32 > & | GetColorChannelsMap () const =0 |
| virtual const K2Vector< int32 > & | GetProcessChannelsMap () const =0 |
| virtual const K2Vector< int32 > & | GetCMYKChannelsMap () const =0 |
| virtual const K2Vector< int32 > & | GetSpotChannelsMap () const =0 |
| virtual const K2Vector< int32 > & | GetRegistrationChannelsMap () const =0 |
| virtual ChannelType | GetNthChannelInfo (uint32 n, int32 *index=nil) const =0 |
| virtual WideString | GetNthChannelName (uint32 n) const =0 |
| virtual uint32 | GetIndexedNumEntries () const =0 |
| virtual void | GetIndexedNthEntry (int32 n, K2Vector< PMReal > &vals) const =0 |
| virtual void | GetColorSpace (CAGMColorSpace &spc) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface is of use to preflight rule implementations; ie if you're writing a preflight rule, you may need the data exposed in this interface. Otherwise you're not going to need this.
Furthermore, this interface is related to rules that inspect artwork. Artwork is the term used to refer to marking operations that are captured by the preflight engine and handed to rules for further inspection. To get to this information you ask to visit objects of preflight class kPreflightOM_ArtworkMark in your IPreflightRuleVisitor::GetClassesToVisit() implementation.
The group of artwork interfaces are nonpersistent interfaces that live on typically very short lived bosses. The root object, kPreflightAtworkMarkBoss, is created by a call to IPreflightObjectModel::QueryObject(), typically on your behalf via IPreflightVisitInfo::QueryObject(), in your implementation of IPreflightRuleVisitor. From that root object you can query to get other kinds of objects.
Here's the hierarchy of interfaces that live on an artwork marking boss, or are served up by those interfaces.
kPreflightAtworkMarkBoss IPreflightObject IPreflightArtworkMarkInfo IPreflightArtworkPaintInfo (via QueryColorPaintInfo, QueryAlphaPaintInfo) IPreflightArtworkCSInfo (via QueryColorSpace) IPreflightArtworkCSInfo (via QueryBase, QueryProcess, etc) IPreflightArtworkImage (via Rasterize()) IPreflightArtworkCSInfo (via QueryColorSpace) IPreflightArtworkShapeContext IPreflightArtworkTextContext IPreflightArtworkOPIContext IPreflightArtworkOPI
The categories in which a given channel corresponds.
Basic Type.
| Enumerator | |
|---|---|
| kCS_NChannel | NChannel is a process space combined with spots. Use QueryBase to access the base process space. |
| kCS_DeviceN | General DeviceN, meaning an arbitrary combination of spots and possibly individual CMYK inks. |
| kCS_Indexed | An indexed (single channel) space which points to an array of values in another colorspace. Use QueryBase() to obtain information about the underlying space. |
| kCS_Pattern | A pattern, which is a wrapped-up bit of artwork which itself may have different colorspaces and so on. This is generally opaque; none of the methods below will do much. However, patterns are auto-expanded into artwork so you can ignore this marking operation if you like and wait for the child artwork to arrive later. |
| pure virtual |
Get the map of the channel indices of the CMYK channels. The resulting array will have four color values corresponding to cyan, magenta, yellow, and black. A value of -1 indicates that there is no corresponding channel; otherwise it is the index of the corresponding channel for that colorant.
| pure virtual |
Get the alpha channel index, if there is one.
| pure virtual |
Get the internal/private CAGMColorSpace. This is for internal use only.
| spc | OUT The smart pointer to fill with the colorspace. |
| pure virtual |
Get the Nth index colors. Note that QueryBase() will give you the space you need to interpret the array.
| n | IN The index of the entry you want. |
| vals | OUT Receives the array of color values. |
| pure virtual |
Get the number of entries in an indexed color type space.
| pure virtual |
Get information on a particular channel.
| n | The (0 based) index of the channel you want to examine. |
| index | If not nil, receives the corresponding index based on the returned type. For kChannelTypeProcess, receives the index into the process space (eg for RGB, 1 = Green). For kChannelTypeCMYKInDeviceN, the index is the CMYK index. |
| pure virtual |
For DeviceN colorspaces, returns the name of the colorant.
| n | The (0 based) index of the channel you want to examine. |
| pure virtual |
Return the total number of channels (color + alpha). For information regarding subsets, eg the channels, or spot channels:
| pure virtual |
Get the map for the process channels. This works on process colorspaces and NChannel colorspaces. The map will have the same number of channels as the process (or base process, in the case of NChannel) space. Each entry in the map is the channel index of the corresponding process space. For example for RGB+Spot NChannel, map[0] gives you the channel number corresponding to the Red channel. If the colorspace is ARGB then this would be 1.
| pure virtual |
Get the map for the registration channel. This will be of size zero if there is no registration channel, else of size 1 with the single element being the channel index of the registration data.
| pure virtual |
Get the map for the spot channels – that is, the channels in the colorspace that correspond to non-process channels. This does not include the CMYK channels if any; nor does it include a registration channel.
| pure virtual |
Return the colorspace type, if applicable.
| pure virtual |
This is used to initialize the interface. This takes an opaque type, so only InDesign internal code can call or implement this method.
| cs | IN The opaque colorspace object that this interface gives you information about. |
| pure virtual |
For hierarchical types, return the underlying, or base, type. For Indexed, returns the colorspace in which the index entries are stored (including NChannel). For NChannel, returns the process colorspace on which the NChannel is based. For all other types, returns nil.
| pure virtual |
Returns a colorspace that's raster port safe. AGM doesn't support DeviceN or separation images, for example, so these are promoted to full NChannel. Indexed colorspaces use their base colorspace (which is then checked again for safe promotion).
If the colorspace is already safe (and with the same alpha), returns a refcounted same-interface pointer.
| alpha | The desired alpha state of the resulting colorspace. |
| pure virtual |
Returns a colorspace with specified alpha state. If the alpha state already matches the current alpha state, simply returns a refcounted pointer to this colorspace. Otherwise it creates a new colorspace with the specified alpha state and returns that.
| alpha | The desired alpha state of the resulting colorspace. |
| pure virtual |
If there's a process space in this or a child space, finds it and returns it. For simple process spaces, returns the same space. (But still refcounted.) For Indexed, recursively checks the base colorspace. For NChannel, returns the process colorspace on which the NChannel is based. If there is no base process space anywhere (for example, DeviceN), returns nil.