CGM Objects Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Path.h
1 // Path.h: interface for the path class.
2 //
5 
6 #if !defined(AFX_PATH_H__720D2D33_CBAA_4EE8_B476_F0143E874CFC__INCLUDED_)
7 #define AFX_PATH_H__720D2D33_CBAA_4EE8_B476_F0143E874CFC__INCLUDED_
8 
9 #pragma once
10 
11 #include "Utility/DPoint.h"
12 #include "Matrix.h"
13 
14 namespace Larson
15 {
17  class Path
18  {
19  public:
20  typedef enum ePathType {
21  POLYLINE_PATH,
22  POLYBEZIER_PATH_DISCONT,
23  POLYBEZIER_PATH_CONT
24  } ePathType;
25 
27  typedef struct
28  {
29  DPoint* pPts;
30  ePathType type; // poly type: polyline, 1 = polybezier dis, 2= polybezier continuous
31  long count; // number of points this poly
32  bool closed; // closed flag
33  } PathElement;
34 
36  Path(int nNew = 0);
38  ~Path();
40  void AddPoints(DPoint *pts, long count, ePathType type = POLYLINE_PATH, bool closed = false);
42  void TransformBy(CMatrix* pMat);
43  void operator=( const Path& a );
44 
48  int nPaths;
49  };
50 };
51 
52 #endif // !defined(AFX_PATH_H__720D2D33_CBAA_4EE8_B476_F0143E874CFC__INCLUDED_)
int nPaths
number of path elements
Definition: Path.h:48
Path(int nNew=0)
Constructor.
Definition: Path.cpp:9
void TransformBy(CMatrix *pMat)
transform this path
Definition: Path.cpp:91
PathElement * pData
array of path elements
Definition: Path.h:46
path element structure, points, type, count, closed flag
Definition: Path.h:27
Path – graphical path data container class.
Definition: Path.h:17
void AddPoints(DPoint *pts, long count, ePathType type=POLYLINE_PATH, bool closed=false)
add a path element
Definition: Path.cpp:49
CMatrix – transform matrix class.
Definition: Matrix.h:16
~Path()
Destructor.
Definition: Path.cpp:32