AreaPattern.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #define PATTERN_ID 32040 // Pattern linkage ID
11 #define PATTERN_CONTROL "Pattern Control Element"
12 
13 #define MAX_DWG_HATCH_LINES 50
14 #define MAX_DWG_EXPANDEDHATCH_LINES 400
15 #define MAX_DWG_HATCH_LINE_DASHES 20
16 
17 #if !defined(__midl) // For a MIDL compile, all we care about are the values of the #define constants.
18 
20 
21 /*=================================================================================**/
28 struct DwgHatchDefLine
30 {
31 double angle;
34 short nDashes;
36 };
37 
39 {
40 short nDefLines;
41 double pixelSize;
43 };
44 
47  {
59  };
60 
63 {
64  Normal = 0,
65  Parity = 1,
66 };
67 
70 {
71  None = 0,
72  Space1 = 0x0001,
73  Angle1 = 0x0002,
74  Space2 = 0x0004,
75  Angle2 = 0x0008,
76  Scale = 0x0010,
77  Cell = 0x0020,
78  Tolerance = 0x0040,
79  Style = 0x0080,
80  Weight = 0x0100,
81  Color = 0x0200,
82  Snap = 0x0400,
83  RotMatrix = 0x0800,
84  Offset = 0x1000,
85  HoleStyle = 0x2000,
86  DwgHatchDef = 0x4000,
87  Multiline = 0x8000,
88  Origin = 0x10000,
89  PixelSize = 0x20000,
90  IslandStyle = 0x40000,
91  TrueScale = 0x80000,
92  RawDwgLoops = 0x100000,
93  DwgHatchOrigin = 0x200000,
94  AnnotationScale = 0x400000,
95 };
96 
98 
99 
102 {
106 };
107 
108 
115 // For in-memory use only!
117 {
118 private:
119  virtual void MakeClassAbstract() = 0;
120 public:
121 public:
122 
124 DGNPLATFORM_EXPORT static PatternParamsPtr Create ();
125 
127 DGNPLATFORM_EXPORT static PatternParamsPtr CreateFromExisting (PatternParamsCR existing);
128 
130 DGNPLATFORM_EXPORT void Copy (PatternParamsCR existing);
131 
134 
136 DGNPLATFORM_EXPORT PatternParamsModifierFlags GetModifiers () const;
137 
139 DGNPLATFORM_EXPORT RotMatrixCR GetOrientation () const;
140 
143 
145 DGNPLATFORM_EXPORT double GetPrimarySpacing () const;
146 
148 DGNPLATFORM_EXPORT double GetPrimaryAngle () const;
149 
151 DGNPLATFORM_EXPORT double GetSecondarySpacing () const;
152 
154 DGNPLATFORM_EXPORT double GetSecondaryAngle () const;
155 
157 DGNPLATFORM_EXPORT double GetScale () const;
158 
160 DGNPLATFORM_EXPORT double GetTolerance () const;
161 
164 DGNPLATFORM_EXPORT WCharCP GetCellName () const;
165 
167 DGNPLATFORM_EXPORT ElementId GetCellId () const;
168 
170 DGNPLATFORM_EXPORT Int32 GetMinLine () const;
171 
173 DGNPLATFORM_EXPORT Int32 GetMaxLine () const;
174 
177 DGNPLATFORM_EXPORT UInt32 GetColor () const;
178 
181 DGNPLATFORM_EXPORT UInt32 GetWeight () const;
182 
186 DGNPLATFORM_EXPORT Int32 GetStyle () const;
187 
189 DGNPLATFORM_EXPORT PatternParamsHoleStyleType GetHoleStyle () const;
190 
192 DGNPLATFORM_EXPORT DwgHatchDefCR GetDwgHatchDef () const;
193 
196 DGNPLATFORM_EXPORT DPoint3dCR GetOrigin () const;
197 
200 DGNPLATFORM_EXPORT double GetAnnotationScale () const;
201 
204 
206 DGNPLATFORM_EXPORT void SetOrientation (RotMatrixCR);
207 
210 
212 DGNPLATFORM_EXPORT void SetPrimarySpacing (double);
213 
215 DGNPLATFORM_EXPORT void SetPrimaryAngle (double);
216 
218 DGNPLATFORM_EXPORT void SetSecondarySpacing (double);
219 
221 DGNPLATFORM_EXPORT void SetSecondaryAngle (double);
222 
224 DGNPLATFORM_EXPORT void SetScale (double);
225 
227 DGNPLATFORM_EXPORT void SetTolerance (double);
228 
233 DGNPLATFORM_EXPORT void SetCellName (WCharCP);
234 
236 DGNPLATFORM_EXPORT void SetCellId (ElementId);
237 
239 DGNPLATFORM_EXPORT void SetMinLine (Int32);
240 
242 DGNPLATFORM_EXPORT void SetMaxLine (Int32);
243 
246 DGNPLATFORM_EXPORT void SetColor (UInt32);
247 
250 DGNPLATFORM_EXPORT void SetWeight (UInt32);
251 
255 DGNPLATFORM_EXPORT void SetStyle (Int32);
256 
259 
261 DGNPLATFORM_EXPORT void SetDwgHatchDef (DwgHatchDefCR);
262 
265 DGNPLATFORM_EXPORT void SetOrigin (DPoint3dCR);
266 
269 DGNPLATFORM_EXPORT void SetAnnotationScale (double);
270 
271 }; // PatternParams
272 
274 #endif // !defined(__midl)
275 
277 
3x3 matrix commonly used for pure rotations, but in general may also have scales and non-perpendicula...
Definition: rotmatrix.h:21
#define ENUM_IS_FLAGS(ENUMTYPE)
Definition: Bentley.r.h:164
Definition: AreaPattern.h:105
DPoint2d offset
Definition: AreaPattern.h:33
Definition: AreaPattern.h:104
PatternParamsCompareFlags
PatternParams compare flags.
Definition: AreaPattern.h:46
short islandStyle
Definition: AreaPattern.h:42
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
double angle
Definition: AreaPattern.h:31
The default file attribute.
patternParams.dwgHatchDef.pixelSize set
Each member of the PatternParams structure has a corresponding bit in PatternParamsModifierFlags that...
Definition: AreaPattern.h:116
Definition: AreaPattern.h:38
short nDashes
Definition: AreaPattern.h:34
short nDefLines
Definition: AreaPattern.h:40
Offset constraint.
double GetOffset()
Definition: AssociativeElementAPI.h:239
struct RotMatrix const & RotMatrixCR
Definition: msgeomstructs_typedefs.h:135
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
wchar_t const * WCharCP
Definition: Bentley.h:224
void SetOffset(double offset)
Definition: AssociativeElementAPI.h:240
dwg hatch origin has been specified as pattern origin
uint32_t UInt32
Definition: Bentley.r.h:128
struct DgnPlatform::DwgHatchDef const & DwgHatchDefCR
Definition: DgnPlatform.h:251
double pixelSize
Definition: AreaPattern.h:41
patternParams.dwgHatchDef.islandStyle set
PatternPlacementTypes
Selects Pattern Placement Type.
Definition: AreaPattern.h:101
int32_t Int32
Definition: Bentley.r.h:119
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
#define MAX_DWG_HATCH_LINE_DASHES
Definition: AreaPattern.h:15
patternParams.minLine, patternParams.maxLine present
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
PatternParamsHoleStyleType
Selects Pattern Hole Style.
Definition: AreaPattern.h:62
DPoint2d through
Definition: AreaPattern.h:32
PatternParamsModifierFlags
Flags indicating modification of corresponding field in PatternParams.
Definition: AreaPattern.h:69
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
UInt64 ElementId
Definition: DgnPlatformBaseType.r.h:83
struct DgnPlatform::PatternParams const & PatternParamsCR
Definition: DgnPlatform.h:418
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
2d point coordinates.
Definition: dpoint2d.h:23
Definition: AreaPattern.h:103

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.