CFx SDK Documentation  2023 SP0
DbLSSymbolReference.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef ODDGNLS_DBLSSYMBOLREFERENCE_H
25 #define ODDGNLS_DBLSSYMBOLREFERENCE_H
26 
27 #include "OdaCommon.h"
28 #include "DbFiler.h"
29 
30 #include "TD_PackPush.h"
31 
39 {
41  {
42  kLSAtStroke = 0, // No vertex mask.
43  kLSAtOrigin = 4, // Symbol at element origin.
44  kLSAtEnd = 8, // Symbol at element end.
45  kLSAtVertex = 16 // Symbol on each element vertex.
46  };
47  enum Justify
48  {
49  kLSNoJustify = 0, // No symbol justification (symbol on stroke)
50  kLSJustifyLeft = 1, // Symbol at left stroke side.
51  kLSJustifyRight = 2, // Symbol at right stroke side.
52  kLSJustifyCenter = 3 // Symbol at center of stroke.
53  };
55  {
56  kLSRelative = 0, // Rotation relative to curve direction.
57  kLSAbsolute = 1, // Rotation in absolute coordinates of drawing.
58  kLSAdjusted = 2 // Rotation is adjusted left to right; mirror symbols if line is reversed.
59  };
60 
61 protected:
62  bool m_bPartialStrokes; // Partial: Origin: true (projected: false), Projected: true (projected: true), None: false (projected: false)
65  bool m_bPartialProjected; // Look for m_bPartialStrokes
66  bool m_bSymbolColor; // false - use line color, true - use element color
67  bool m_bSymbolWeight; // false - use line lineweight, true - use element lineweight
68  Justify m_Justify; // 0 for vertex symbols
70  OdInt16 m_nVertexMask; // 0 for stroke symbols
71  double m_fXOffset;
72  double m_fYOffset;
73  double m_fAngle; // in radians
74  OdInt32 m_nStroke; // -1 for vertex symbols
76 
77 public:
88  , m_fXOffset(0.0)
89  , m_fYOffset(0.0)
90  , m_fAngle(0.0)
91  , m_nStroke(-1)
92  {
93  }
94 
101  bool partialStrokes() const { return m_bPartialStrokes; }
107  void setPartialStrokes(bool bSet) { m_bPartialStrokes = bSet; }
108 
112  bool clipPartial() const { return m_bClipPartial; }
118  void setClipPartial(bool bSet) { m_bClipPartial = bSet; }
119 
123  bool allowStretch() const { return m_bAllowStretch; }
129  void setAllowStretch(bool bSet) { m_bAllowStretch = bSet; }
130 
134  bool partialProjected() const { return m_bPartialProjected; }
140  void setPartialProjected(bool bSet) { m_bPartialProjected = bSet; }
141 
148  bool useSymbolColor() const { return m_bSymbolColor; }
154  void setUseSymbolColor(bool bSet) { m_bSymbolColor = bSet; }
155 
162  bool useSymbolLineweight() const { return m_bSymbolWeight; }
168  void setUseSymbolLineweight(bool bSet) { m_bSymbolWeight = bSet; }
169 
173  Justify justify() const { return m_Justify; }
179  void setJustify(Justify nSet) { m_Justify = nSet; }
180 
191 
203  void setVertexMask(OdUInt32 nVertexMask) { m_nVertexMask = (OdInt16)nVertexMask; }
204 
208  double xOffset() const { return m_fXOffset; }
214  void setXOffset(double fOffset) { m_fXOffset = fOffset; }
215 
219  double yOffset() const { return m_fYOffset; }
225  void setYOffset(double fOffset) { m_fYOffset = fOffset; }
226 
230  double angle() const { return m_fAngle; }
236  void setAngle(double fAngle) { m_fAngle = fAngle; }
237 
241  OdInt32 strokeNumber() const { return m_nStroke; }
249  void setStrokeNumber(OdInt32 nStroke) { m_nStroke = nStroke; }
250 
261 
262 private:
264 
265  OdResult dwgInFields(OdDbDwgFiler *pFiler);
266  void dwgOutFields(OdDbDwgFiler *pFiler) const;
267  OdResult dxfInFields(OdDbDxfFiler *pFiler);
268  void dxfOutFields(OdDbDxfFiler *pFiler) const;
269 
270 #ifdef ODA_DIAGNOSTICS
271  void trace(OdUInt32 nSymbol) const;
272 #endif
273 };
274 
275 #include "TD_PackPop.h"
276 
277 #endif // ODDGNLS_DBLSSYMBOLREFERENCE_H
true
Definition: DimVarDefs.h:2046
false
Definition: DimVarDefs.h:165
unsigned int OdUInt32
short OdInt16
int OdInt32
OdResult
Definition: OdResult.h:29
RotationType rotationType() const
void setRotationType(RotationType nSet)
void setVertexMask(OdUInt32 nVertexMask)
OdDbObjectId symbolComponent() const
void setUseSymbolColor(bool bSet)
OdInt32 strokeNumber() const
void setJustify(Justify nSet)
OdUInt32 vertexMask() const
void setPartialProjected(bool bSet)
OdDbHardPointerId m_SymbolComponent
void setSymbolComponent(const OdDbObjectId &id)
friend class OdDbLSPointComponentImpl
void setXOffset(double fOffset)
void setAllowStretch(bool bSet)
void setUseSymbolLineweight(bool bSet)
void setAngle(double fAngle)
void setYOffset(double fOffset)
void setClipPartial(bool bSet)
void setPartialStrokes(bool bSet)
void setStrokeNumber(OdInt32 nStroke)