InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IColorSystemUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bernd Paradies
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IColorSystemUtils__
25 #define __IColorSystemUtils__
26 
27 #include "AppFrameworkID.h"
28 #include "IPMUnknown.h"
29 #include "Utils.h"
30 #include "BravoForwardDecl.h"
31 
32 #include "IColorData.h"
33 
34 #include "ColorSystemID.h"
35 #include "ShuksanID.h"
36 
37 #include "GraphicTypes.h"
38 #include "PMString.h"
39 #include "K2Vector.h"
40 
41 class IGraphicsPort;
42 class IDocument;
43 class IInkData;
44 class IColorOverrides;
45 class IColorSpaceMgr;
46 class IDataBase;
47 class IInkList;
49 
50 
54 {
55 public:
56  enum { kDefaultIID = IID_ICOLORSYSTEMUTILS };
57 
58 
67  virtual PMString GetColorInfoString( const int32& colorSpace,
68  const ColorArray& colorValueArray,
69  bool16 doUseComma ) = 0;
70 
71 
72 
79  virtual IPMUnknown* QueryBaseRenderObject(IDataBase* iDataBase, UID renderObjectUID, PMIID iidToQuery = IID_IUNKNOWN) = 0;
80 
86  virtual IPMUnknown* QueryBaseRenderObject(IPMUnknown* object, PMIID iidToQuery = IID_IUNKNOWN) = 0;
87 
93  virtual PMReal GetTintValueFromSwatch(const UIDRef& swatchRef) = 0;
94 
100  virtual PMReal GetTintValueFromColorObject(IPMUnknown* colorObject) = 0;
101 
106  virtual PMReal GetCurrentActiveTintValue( IDataBase* iDataBase ) = 0;
107 
108  //___________________________________________________________________________________
109 
118  virtual AGMColorSpace* NewAGMColorSpace (int32 colorFamily, const ColorArray& colorArray, const UIDList* pInkUIDList, IInkList* iInkList = nil) = 0;
119 
128  virtual AGMColorSpace* NewAGMColorSpaceFromColorSwatch (const UIDRef& swatchRef) = 0;
129 
139  virtual void GetColorSpaceAndColorValue(bool16 doPrint, const UIDRef& swatchRef, const PMReal& tint,
140  AGMColorSpace **colorSpace, float *colorValue, IGraphicsPort* gPort = nil) = 0;
141 
142 
147  virtual void ReleaseColorSpace(AGMColorSpace *colorSpace) = 0;
148 
158  virtual void SetColorSpaceAndColorValue (IGraphicsPort *gPort, int32 colorFamily, const ColorArray& colorArray, const PMReal& tint, const UIDList* pInkUIDList = nil) = 0;
159 
170  virtual void SetColorSpaceAndColorValue( IGraphicsPort *gPort, IColorData* iColorData, IColorData* iAltColorData,
171  IInkData* iInkData, IColorOverrides* iCORides,
172  IColorSpaceMgr* iCSMgr, const PMReal& tint ) = 0;
173 
184  virtual ColorArray ColorTransform( IDocument* iDoc, ColorArray srcArray, int32 srcColorSpace, int32 dstColorSpace, const UIDList* pInkUIDList = nil, IInkList* iInkList = nil) = 0;
185 
192  virtual ColorArray GetTintedColorComponents(int32 colorSpace, ColorArray colorArray, PMReal tint) = 0;
193 
201  virtual void GetColorSwatchColorSpaceAndValue (const UIDRef& colorRef, int32& colorspace, ColorArray& colorArray, PMReal& tint) = 0;
202 
211  virtual bool32 IsWhite(const UIDRef& swatchRef, PMReal tint = kDefaultTintPercent, bool32 useAltspaceOnly = kFalse) = 0;
212 
220  virtual bool32 ShouldIgnorePaperColor(IViewPortAttributes* iAttr) = 0;
221 
225  virtual void RGBToHSB( PMReal r, PMReal g, PMReal b, PMReal &h, PMReal &s, PMReal &v ) = 0;
226 
230  virtual void HSBToRGB( PMReal h, PMReal s, PMReal v, PMReal &r, PMReal &g, PMReal &b ) = 0;
231 };
232 
233 
234 #endif // __IColorSystemUtils__
235