InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IImageFacade.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: David Stephens
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 __IImageFacade__
25 #define __IImageFacade__
26 
27 // ----- Interfaces -----
28 
29 #include "IPMUnknown.h"
30 
31 // ----- Includes -----
32 
33 #include "ImageTypes.h"
34 #include "ImageID.h"
35 #include "BravoForwardDecl.h"
36 
37 class IPMStream;
38 
39 namespace Facade
40 {
41 // Please use the IImageFacade directly via the UtilsBoss if possible, see Utils.h:
42 // i.e. Utils<Facade::IImageFacade>()->GetImageInfo( ... );
43 // Or, you can simply include ImageFacade.h (instead of IImageFacade.h) and then use
44 // ImageFacade::GetImageInfo( ... );
45 
52  class IImageFacade : public IPMUnknown
53  {
54  public:
55  enum { kDefaultIID = IID_IIMAGEFACADE };
56 
57  // ***********************
58  // Image Info Routines
59  // ***********************
60 
77  virtual ErrorCode GetImageInfo(const IPMUnknown* imageOrProxyBoss, PMRect* bounds,
78  int32* colorSpace, Fixed *xRes, Fixed *yRes) const = 0;
79 
95  virtual ErrorCode GetImageInfo(const UIDRef& imageOrProxyRef, PMRect* bounds,
96  int32* colorSpace, Fixed *xRes, Fixed *yRes) const = 0;
97 
107  virtual ErrorCode GetChannelInfo(
108  const UIDRef& imageOrProxyRef,
109  uint32& totalChannels, // total number of channels
110  uint32& colorChannels, // total number of color channels (not including spot colors)
111  uint32& transparencyAlphas, // 0 or 1
112  uint32& spotChannels, // total number of spot channels
113  uint32& otherChannels // total number of extra alphas which are not spot channels and do not describe transparency
114  ) const = 0;
115 
123  virtual ErrorCode GetSpotChannelName (const UIDRef& imageOrProxyRef,uint32 spotIndex, PMString& name) const = 0;
124 
130  virtual ErrorCode GetTransparencyAlphaName (const UIDRef& imageOrProxyRef,PMString& name) const = 0;
131 
139  virtual ErrorCode GetExtraChannelName( const UIDRef& imageOrProxyRef, uint32 extraChannelIndex, PMString& name ) const = 0;
140 
146  virtual bool16 IsTransparencyAlphaPreMultiplied( const UIDRef& imageOrProxyRef ) const = 0;
147 
148  // GetProxy
149 
154  virtual const UIDRef GetProxyUIDRef(const IPMUnknown* imageBoss) const = 0;
155 
160  virtual const UIDRef GetProxyUIDRef(const UIDRef& imageRef) const = 0;
161 
162 
167  virtual bool16 IsEmbeddedImage(const IPMUnknown* boss) const = 0;
172  virtual bool16 IsEmbeddedImage(const UIDRef& imageRef) const = 0;
173 
178  virtual IPMStream *GetImageStream(const UIDRef& imageOrProxyRef) const = 0;
179 
186  virtual AGMColorSpace *GetAGMColorProfileFromImage(const UIDRef &imageOrProxyRef) const = 0;
187 
192  virtual ClassID GetReadFilterClassID(const UIDRef& imageOrProxyRef) const = 0;
193 
194 
199  // virtual IClippingFacade* QueryClippingPathFacade(void) const = 0;
200 
205  // virtual IImageWrapFacade* QueryImageWrapFacade(void) const = 0;
206  };
207 }
208 
209 #endif // __IImageFacade__