CGM Objects Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
HatchStyles.h
1 // HatchStyles.h: interface for the CHatchStyles class.
2 //
5 
6 #if !defined(AFX_HATCHSTYLES_H__B293419D_43B4_4BC8_9449_8449AEB7D011__INCLUDED_)
7 #define AFX_HATCHSTYLES_H__B293419D_43B4_4BC8_9449_8449AEB7D011__INCLUDED_
8 
9 #pragma once
10 
11 #include <vector>
12 
13 namespace Larson
14 {
15 
16  #define MAX_HSTYLES 32 /* Max number of hatch style defs all profiles */
17  #define MAX_HATCHGAP 16 /* Max hatch gap widths all profiles */
18 
20  class CHatchStyles
21  {
22  public:
23  CHatchStyles();
24  virtual ~CHatchStyles();
25 
27  typedef struct {
28  long ix;
29  long indicator;
30  double hVec1[2];
31  double hVec2[2];
32  double dutyCycle;
33  long nHatchLines;
34  long *gapWidths;
35  long *lineTypes;
36  long sum;
38 
40  hatchStyleDefStruct* getDef(long ix);
41 
43  hatchStyleDefStruct* Add(long ix, long indicator, double dutyCycle,
44  double hVec1[2], double hVec2[2], long nHatchLines, long* gapWidths,
45  long* lineTypes);
49  void Remove(long index);
50 
52  std::vector<hatchStyleDefStruct> m_defs;
53 
54  };
55 };
56 #endif // !defined(AFX_HATCHSTYLES_H__B293419D_43B4_4BC8_9449_8449AEB7D011__INCLUDED_)
long * lineTypes
list of distances between hatch lines
Definition: HatchStyles.h:35
long indicator
user index
Definition: HatchStyles.h:29
long * gapWidths
number hatch lines in list
Definition: HatchStyles.h:34
hatch style definition entry
Definition: HatchStyles.h:27
CHatchStyles – contains user defined Hatch Style definitions.
Definition: HatchStyles.h:20
double dutyCycle
second dir vec (if crosss hatch)
Definition: HatchStyles.h:32
long nHatchLines
duty cycle
Definition: HatchStyles.h:33
hatchStyleDefStruct * Add(long ix, long indicator, double dutyCycle, double hVec1[2], double hVec2[2], long nHatchLines, long *gapWidths, long *lineTypes)
add a Hatch Style definition from data
Definition: HatchStyles.cpp:46
void Remove(long index)
remove a Hatch Style definition entry
Definition: HatchStyles.cpp:125
long sum
list of line types
Definition: HatchStyles.h:36
std::vector< hatchStyleDefStruct > m_defs
tables of Hatch Style definitions
Definition: HatchStyles.h:52
hatchStyleDefStruct * getDef(long ix)
return pointer Hatch Style definition entry
Definition: HatchStyles.cpp:26