InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PathBoundsOutlineInfo.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: jargast
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 __PathBoundsOutlineInfo__
25 #define __PathBoundsOutlineInfo__
26 
27 #include "IOutlineInfo.h"
28 #include "PMPoint.h"
29 #include "PMRect.h"
30 #include "PMMatrix.h"
31 #include "PMBezierCurve.h"
32 
33 
34 
44 {
45 public:
53  (
54  const PMMatrix& xForm
55  );
56 
62  const PMRect& GetBoundingBox() const;
63 
67  void ResetBounds();
68 
72  virtual void BeginPath();
73 
77  virtual void EndPath();
78 
85  virtual void moveto(const PMReal& x, const PMReal& y);
86 
95  virtual void lineto(const PMReal& x, const PMReal& y);
96 
112  virtual void curveto(const PMReal& x1, const PMReal& y1, const PMReal& x2, const PMReal& y2, const PMReal& x3, const PMReal& y3);
113 
124  virtual void closepath();
125 
126 private:
128 
129 private:
130  PMReal fLastX, fLastY;
131  PMReal fFirstX, fFirstY;
132 
133  bool16 fBoundsSet;
134  PMRect fBoundingBox;
135 
136  PMMatrix fXform;
137  bool16 fIsMatrixIdentity;
138 
139  // temp storage for line methods
140  PMPoint fP0, fP1;
141 
142  // temp storage for curve methods
143  PMBezierCurve fCurve;
144 
145  // temp storage for bounds calculations
146  PMReal fuList[4];
147 };
148 
149 
150 #endif
151