InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TranFxMatteFactory.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Adobe Developer Technologies
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 __TranFxHelper_H_DEFINED__
25 #define __TranFxHelper_H_DEFINED__
26 
27 class IShape;
28 class AGMImageAccessor;
30 class IHierarchy;
31 
42 {
43 
44 public:
48 
51  virtual ~TranFxMatteFactory();
52 
53 public:
54  // Effect image methods:
55 
64  const AGMImageAccessor* MakeMatte(IShape* iShape, const PMReal& resolution, const DrawOptionsSet& drawOptionsSet, const bool16 enableCaching);
65 
70  PBPMRect GetBoundingBox(IShape* iShape) const;
71 
83  bool16 GetPaintedBBoxWithoutMatte(IShape* iShape, PBPMRect& bounds) const;
84 
85 public:
86  // Cache management methods:
87 
91  void PurgeImageCache(const UIDList& itemList);
92 
96  void PurgeWholeCache(const UIDRef& documentUIDRef);
97 
98 private:
106  void AddToCache(const AGMImageAccessor* image, uint32 startTime, const UIDRef& itemUIDRef, const PMReal& resolution, uint32 checksum);
107 
114  const AGMImageAccessor* FindInCache(const UIDRef& currentShapeRef, const PMReal& resolution, uint32 checksum);
115 
119  bool16 InkingIsSafeToCache(IShape* iShape);
120 
127  bool16 InkingIsSafeToCacheRecursive(IHierarchy* iPageItem, int32& childCount);
128 
132  bool16 ObjectHasNoColor(IGraphicStyleDescriptor* gsDesc);
133 
140  void SetMaskImage(const AGMImageAccessor* image);
141 
142 private:
143  AGMImageAccessor* fMaskImage;
144 };
145 
146 #endif // __TranFxHelper_H_DEFINED__
147