InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IGraphicsUtils.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 __IGraphicsUtils__
25 #define __IGraphicsUtils__
26 
27 #include "InstStrokeFillID.h"
28 #include "IPMUnknown.h"
29 #include "Utils.h"
30 
31 #include "PMPoint.h"
32 #include "PMRect.h"
33 
34 class IPathData;
35 class IGraphicsPort;
36 class IRasterPort;
37 class IOffscreenPortData;
38 class IGraphicsContext;
39 class IPathPort;
40 class IOutlineInfo;
41 class PMMatrix;
42 class IColorSpaceMgr;
43 class GraphicsData;
44 
45 
46 
49 class IGraphicsUtils : public IPMUnknown
50 {
51 public:
52  enum { kDefaultIID = IID_IGRAPHICSUTILS };
53 
58  virtual void CopyPathToPort
59  (
60  const IPathData* srcPath,
61  IGraphicsPort* gPort
62  ) = 0;
63 
70  (
71  IRasterPort* rPort,
72  const PMReal& userCoord
73  ) = 0;
74 
83  virtual void CreateAnchorPointPath
84  (
85  IRasterPort* rPort,
86  IGraphicsPort* gPort,
87  const PMPoint& handleLocation,
88  const PMReal& size = PMReal(4.0),
89  bool16 doFloor = kTrue
90  ) = 0;
91 
100  virtual void CreateAnchorRectPaths
101  (
102  IRasterPort* rPort,
103  IGraphicsPort* gPort,
104  const PMRect& theRect,
105  const PMReal& size,
106  bool16 doFloor
107  ) = 0;
108 
120  (
121  IRasterPort* rPort,
122  IGraphicsPort* gPort,
123  const PMMatrix& sourceToUserMatrix,
124  const PMPoint& handleLocation,
125  const PMReal& size = PMReal(4.0),
126  bool16 doFloor = kTrue
127  ) = 0;
128 
139  (
140  IRasterPort* rPort,
141  IGraphicsPort* gPort,
142  const PMMatrix& sourceToUserMatrix,
143  const PMRect& sourceRect,
144  const PMReal& size,
145  bool16 doFloor = kTrue
146  ) = 0;
147 
155  virtual void CreateDirectionPointPath
156  (
157  IRasterPort* rPort,
158  IGraphicsPort* gPort,
159  const PMPoint& handleLocation
160  ) = 0;
161 
170  (
171  IRasterPort* rPort,
172  IGraphicsPort* gPort,
173  const PMMatrix& sourceToUserMatrix,
174  const PMPoint& handleLocation
175  ) = 0;
176 
185  virtual void CreateTextLinkPath
186  (
187  IRasterPort* rPort,
188  IGraphicsPort* gPort,
189  const PMPoint& handleLocation,
190  bool16 bVerticalOrientation = kFalse,
191  bool16 bRightToLeftOrientation = kFalse
192  ) = 0;
193 
202  virtual void CreateTextOversetPath
203  (
204  IRasterPort* rPort,
205  IGraphicsPort* gPort,
206  const PMPoint& handleLocation,
207  bool16 drawSelected = kTrue
208  ) = 0;
209 
219  (
220  const PMPoint& beforePt,
221  const PMPoint& currentPt,
222  const PMPoint& afterPt,
223  const PMReal& strokeWeight,
224  const PMReal& miterLimit
225  ) = 0;
226 
243  virtual void ComputeLineBounds
244  (
245  const PMPointList& B, // 2 points
246  const PMReal& strokeWeight,
247  const PMMatrix& xForm,
248  const PMReal& miterLimit,
249  int32 joinType,
250  int32 lineCap,
251  bool16 leftIsOpen,
252  bool16 rightIsOpen,
253  PMPoint* previousPt, // use for miter limit
254  PMReal* xMin,
255  PMReal* xMax,
256  PMReal* yMin,
257  PMReal* yMax
258  ) = 0;
259 
263 
268  virtual bool8 SetupRasterPort(IRasterPort* rPort) = 0;
269 
274  virtual PMRect GetUpdateClipRect (GraphicsData* gd) = 0;
275 
276 };
277 
278 
279 #endif // __IGraphicsUtils__