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

#include <IGraphicChannelInfo.h>

Inheritance diagram for IGraphicChannelInfo:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGRAPHICCHANNELINFO }
 
enum  GraphicChannelType {
  kPMChannelTypeUnknown = 0, kPMAlphaAssociated = 1, kPMAlphaUnassociated = 2, kPMSpotChannel = 3,
  kPMAlphaUnassociatedBackground = 4
}
 

Public Member Functions

virtual void AddChannel (const PMString &channelName, const int32 channelID, const GraphicChannelType channelType, const int32 channelOpacity, const int32 colorSpace, const ColorArray &colorData)=0
 
virtual void RemoveChannel (const int32 channelIndex)=0
 
virtual void Clear ()=0
 
virtual void SetChannelName (const int32 channelIndex, const PMString &newName)=0
 
virtual void SetChannelID (const int32 channelIndex, const int32 newID)=0
 
virtual void SetChannelType (const int32 channelIndex, const GraphicChannelType newType)=0
 
virtual void SetChannelOpacity (const int32 channelIndex, const int32 newOpacity)=0
 
virtual void SetChannelColor (const int32 channelIndex, const int32 colorSpace, const ColorArray &colorData)=0
 
virtual int32 GetNumberChannels () const =0
 
virtual PMString GetNthChannelName (const int32 channelIndex) const =0
 
virtual int32 GetNthChannelID (const int32 channelIndex) const =0
 
virtual GraphicChannelType GetNthChannelType (const int32 channelIndex) const =0
 
virtual int32 GetNthChannelOpacity (const int32 channelIndex) const =0
 
virtual int32 GetNthChannelColorSpace (const int32 channelIndex) const =0
 
virtual ColorArray GetNthChannelColorData (const int32 channelIndex) 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 holding the graphic channel information for placed graphics such as Photoshop (PSD) files. It is assumed that the ID of each channel is unique.

Member Enumeration Documentation

This enum represents the type of the channel. The channel info can be a mix of alpha channels and spot channels
Enumerator
kPMChannelTypeUnknown 

the channel type is unknown or uninitialized

kPMAlphaAssociated 

the channel type is an alpha channel that is pre-multiplied into the color values of the image

kPMAlphaUnassociated 

the channel type is an alpha channel that is not pre-multiplied into the image

kPMSpotChannel 

the channel type is a spot channel

kPMAlphaUnassociatedBackground 

the channel type is an alpha channel that is not pre-multiplied into the image, but it is the background transparency mask

Member Function Documentation

virtual void IGraphicChannelInfo::AddChannel (const PMStringchannelName,
const int32 channelID,
const GraphicChannelType channelType,
const int32 channelOpacity,
const int32 colorSpace,
const ColorArraycolorData 
)
pure virtual

Add a channel into the interface.

Parameters
channelNameIN a PMString containing a channel name.
channelIDIN a unique number that can represent the channel
channelTypeIN the type of channel as defined by GraphicChannelType
channelOpacityIN the opacity of the channel, 0 = transparent, 100 = opaque
colorSpaceIN the color space of the channel, i.e. kPMCsCalCMYK
colorDataIN the color space's color data information
virtual void IGraphicChannelInfo::Clear ()
pure virtual

Clear all channels out of the interface.

virtual ColorArray IGraphicChannelInfo::GetNthChannelColorData (const int32 channelIndex) const
pure virtual

Get the channel color space of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to get.
Returns
ColorArray of the channel color data - see IColorData.h
virtual int32 IGraphicChannelInfo::GetNthChannelColorSpace (const int32 channelIndex) const
pure virtual

Get the channel color space of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to get.
Returns
int32 of the channel color space, i.e. kPMCsCalCMYK
virtual int32 IGraphicChannelInfo::GetNthChannelID (const int32 channelIndex) const
pure virtual

Get the channel ID of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to get.
Returns
int32 of the channel ID.
virtual PMString IGraphicChannelInfo::GetNthChannelName (const int32 channelIndex) const
pure virtual

Get the channel name of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to get.
Returns
PMString of the channel name.
virtual int32 IGraphicChannelInfo::GetNthChannelOpacity (const int32 channelIndex) const
pure virtual

Get the channel opacity of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to get.
Returns
int32 of the channel opacity, 0 = transparent, 100 = opaque
virtual GraphicChannelType IGraphicChannelInfo::GetNthChannelType (const int32 channelIndex) const
pure virtual

Get the channel type of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to get.
Returns
GraphicChannelType of the channel type - see enum above.
virtual int32 IGraphicChannelInfo::GetNumberChannels () const
pure virtual

Get the number of channels currently stored in the interface. For use when iterating through the channels, setting or getting specific information.

Returns
int32 of the number of channels.
virtual void IGraphicChannelInfo::RemoveChannel (const int32 channelIndex)
pure virtual

Remove a channel from the interface.

Parameters
channelIndexIN the index of the channel to remove.
virtual void IGraphicChannelInfo::SetChannelColor (const int32 channelIndex,
const int32 colorSpace,
const ColorArraycolorData 
)
pure virtual

Set the channel color information of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to change.
colorSpaceIN the new color space to be given to the channel, i.e. kPMCsCalCMYK
colorDataIN the color space's color data information
virtual void IGraphicChannelInfo::SetChannelID (const int32 channelIndex,
const int32 newID 
)
pure virtual

Set the channel ID of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to renumber.
newIDIN the new unique ID to be given to the channel
virtual void IGraphicChannelInfo::SetChannelName (const int32 channelIndex,
const PMStringnewName 
)
pure virtual

Set the channel name of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to rename.
newNameIN the new name to be given to the channel
virtual void IGraphicChannelInfo::SetChannelOpacity (const int32 channelIndex,
const int32 newOpacity 
)
pure virtual

Set the channel opacity of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to change.
newOpacityIN the new opacity to be given to the channel. 0 = transparent, 100 = opaque
virtual void IGraphicChannelInfo::SetChannelType (const int32 channelIndex,
const GraphicChannelType newType 
)
pure virtual

Set the channel type of a given channel index.

Parameters
channelIndexIN the index (zero based) of the channel to change.
newIDIN the new GraphicChannelType to be given to the channel