CGM Objects Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Figure.h
1 // Figure.h: interface for the CFigure class.
2 //
5 
6 #if !defined(AFX_FIGURE_H__C3B87AA6_5796_475A_9A77_A5D56C836740__INCLUDED_)
7 #define AFX_FIGURE_H__C3B87AA6_5796_475A_9A77_A5D56C836740__INCLUDED_
8 
9 #pragma once
10 
11 #include "Utility/Color.h"
12 #include "Path.h"
13 
14 namespace Larson
15 {
17  class CFigure
18  {
19  public:
21  CFigure();
22  virtual ~CFigure();
23 
25  typedef struct {
26  long type;
27  float width;
28  long specMode;
29  CColor color;
30  } edgeAttr;
31 
33  typedef struct {
34  DPoint* pPts; // points list
35  Path::ePathType type; // poly type: 0 = polyline, 1 = polybezier discontinuos, 2= polybezier continuos
36  long count; // number of points this poly
37  unsigned char edgeFlags; // edge flags for this group ..OR..
38  unsigned char* edges; // ..OR.. polygon set edges
39  edgeAttr* pathEdgeAttr; // edge attributes for this path
40  edgeAttr* connEdgeAttr; // connecting edge attributes
41  } figureData;
42 
44  void AddPath(DPoint *points, long nPts, Path::ePathType type, bool closed, unsigned char edgeFlags,
45  unsigned char *edges, edgeAttr* pEdgeAttr);
47  long connectingEdge(edgeAttr* pConnEdgeAttr);
49  long newRegion();
53  long m_nPaths;
54 
55  };
56 };
57 #endif // !defined(AFX_FIGURE_H__C3B87AA6_5796_475A_9A77_A5D56C836740__INCLUDED_)
long m_nPaths
number of path elements in figure data
Definition: Figure.h:53
long newRegion()
begin new region
Definition: Figure.cpp:42
figureData * m_figureData
figure data
Definition: Figure.h:51
CFigure – Figure data class.
Definition: Figure.h:17
figure data structure used by figure
Definition: Figure.h:33
CFigure()
Constructor.
Definition: Figure.cpp:17
long connectingEdge(edgeAttr *pConnEdgeAttr)
set connecting edge
Definition: Figure.cpp:64
void AddPath(DPoint *points, long nPts, Path::ePathType type, bool closed, unsigned char edgeFlags, unsigned char *edges, edgeAttr *pEdgeAttr)
add path specifed by points to figure
Definition: Figure.cpp:85
edge attributes strcuture used by figure
Definition: Figure.h:25