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

#include <ISpectrumData.h>

Inheritance diagram for ISpectrumData:
IPMUnknown

Public Types

enum  LocationType { kNotInSpectrumBar, kInColorBar, kInMinSwatch, kInMaxSwatch }
 

Public Member Functions

virtual void InitializeTables (const int32 colorspace, const int16 width, const int16 height, bool16 doHiRes, bool16 doBWSwatch)=0
 
virtual void InitializeTransition (const int32 colorspace, const ColorArray &components, const int16 width, const int16 height, bool16 doHiRes, bool16 doBWSwatch)=0
 
virtual uint8 * GetTable1 () const =0
 
virtual uint8 * GetTable2 () const =0
 
virtual ColorArray MapPositionToColor (const PMPoint &where, bool16 wantTransitionFract=kTrue)=0
 
virtual LocationType MapPositionToLocation (const PMPoint &where)=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

A data interface for the color bar widget in the color picker panel.

Member Enumeration Documentation

LocationType specfies where the click occurred in the color bar.
Enumerator
kNotInSpectrumBar 

kNotInSpectrumBar indicate that the click is not in the color bar.

kInColorBar 

kInColorBar indicate that the click is in the color bar.

kInMinSwatch 

kInMinSwatch indicate that the click is in the minimum swatch proxy at the end of the color bar.

kInMaxSwatch 

kInMaxSwatch indicate that the click is in the maximum swatch proxy at the end of the color bar.

Member Function Documentation

virtual uint8* ISpectrumData::GetTable1 () const
pure virtual

Returns the pointer to Table1

virtual uint8* ISpectrumData::GetTable2 () const
pure virtual

Returns the pointer to Table2

virtual void ISpectrumData::InitializeTables (const int32 colorspace,
const int16 width,
const int16 height,
bool16 doHiRes,
bool16 doBWSwatch 
)
pure virtual

Initialize two tables internally required to setup the default color bar bitmap. Four color spaces are suppported: CMYK, RGB, LAB, and Grayscale. Table1 contains the ramps column-wise. Table2 contains the ramps row-wise.

Parameters
colorspacespecifies the color space to set up the tables for.
widthspecifies the pixel width of the table.
heightspecifies the pixel height of the table.
doHiReswhether or not we are operating in hi-res mode (affects position-to-color calculations).
doBWSwatchis true if color bar setup includes the minimum and maximum swatch proxy.
virtual void ISpectrumData::InitializeTransition (const int32 colorspace,
const ColorArraycomponents,
const int16 width,
const int16 height,
bool16 doHiRes,
bool16 doBWSwatch 
)
pure virtual

Initialize the transition table internally required to setup the tint transition.

Parameters
colorspacespecifies the color space to set up the transition table for.
componentsspecifies the color values for the transition table.
widthspecifies the pixel width of the transition table.
heightspecifies the pixel height of the transition table.
doHiReswhether or not we are operating in hi-res mode (affects position-to-color calculations).
doBWSwatchis true if color bar setup includes the minimum and maximum swatch proxy.
virtual ColorArray ISpectrumData::MapPositionToColor (const PMPointwhere,
bool16 wantTransitionFract = kTrue 
)
pure virtual

Map a position in the color bar to a color value represented by the point.

Parameters
wherespecifies the point in the color bar.
wantTransitionFractis true if mapping for transition table.
Returns
a color value in the color space of the color bar.
virtual LocationType ISpectrumData::MapPositionToLocation (const PMPointwhere)
pure virtual

Map a position in the color bar to location type represented by the point.

Parameters
wherespecifies the point in the color bar.
Returns
a location type in the color color.