CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbLSSymbolReference.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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
37{
39 {
40 kLSAtStroke = 0, // No vertex mask.
41 kLSAtOrigin = 4, // Symbol at element origin.
42 kLSAtEnd = 8, // Symbol at element end.
43 kLSAtVertex = 16 // Symbol on each element vertex.
44 };
46 {
47 kLSNoJustify = 0, // No symbol justification (symbol on stroke)
48 kLSJustifyLeft = 1, // Symbol at left stroke side.
49 kLSJustifyRight = 2, // Symbol at right stroke side.
50 kLSJustifyCenter = 3 // Symbol at center of stroke.
51 };
53 {
54 kLSRelative = 0, // Rotation relative to curve direction.
55 kLSAbsolute = 1, // Rotation in absolute coordinates of drawing.
56 kLSAdjusted = 2 // Rotation is adjusted left to right; mirror symbols if line is reversed.
57 };
58
59protected:
60 bool m_bPartialStrokes; // Partial: Origin: true (projected: false), Projected: true (projected: true), None: false (projected: false)
63 bool m_bPartialProjected; // Look for m_bPartialStrokes
64 bool m_bSymbolColor; // false - use line color, true - use element color
65 bool m_bSymbolWeight; // false - use line lineweight, true - use element lineweight
66 Justify m_Justify; // 0 for vertex symbols
68 OdInt16 m_nVertexMask; // 0 for stroke symbols
69 double m_fXOffset;
70 double m_fYOffset;
71 double m_fAngle; // in radians
72 OdInt32 m_nStroke; // -1 for vertex symbols
74
75public:
86 , m_fXOffset(0.0)
87 , m_fYOffset(0.0)
88 , m_fAngle(0.0)
89 , m_nStroke(-1)
90 {
91 }
92
99 bool partialStrokes() const { return m_bPartialStrokes; }
105 void setPartialStrokes(bool bSet) { m_bPartialStrokes = bSet; }
106
110 bool clipPartial() const { return m_bClipPartial; }
116 void setClipPartial(bool bSet) { m_bClipPartial = bSet; }
117
121 bool allowStretch() const { return m_bAllowStretch; }
127 void setAllowStretch(bool bSet) { m_bAllowStretch = bSet; }
128
132 bool partialProjected() const { return m_bPartialProjected; }
138 void setPartialProjected(bool bSet) { m_bPartialProjected = bSet; }
139
146 bool useSymbolColor() const { return m_bSymbolColor; }
152 void setUseSymbolColor(bool bSet) { m_bSymbolColor = bSet; }
153
160 bool useSymbolLineweight() const { return m_bSymbolWeight; }
166 void setUseSymbolLineweight(bool bSet) { m_bSymbolWeight = bSet; }
167
171 Justify justify() const { return m_Justify; }
177 void setJustify(Justify nSet) { m_Justify = nSet; }
178
189
201 void setVertexMask(OdUInt32 nVertexMask) { m_nVertexMask = (OdInt16)nVertexMask; }
202
206 double xOffset() const { return m_fXOffset; }
212 void setXOffset(double fOffset) { m_fXOffset = fOffset; }
213
217 double yOffset() const { return m_fYOffset; }
223 void setYOffset(double fOffset) { m_fYOffset = fOffset; }
224
228 double angle() const { return m_fAngle; }
234 void setAngle(double fAngle) { m_fAngle = fAngle; }
235
239 OdInt32 strokeNumber() const { return m_nStroke; }
247 void setStrokeNumber(OdInt32 nStroke) { m_nStroke = nStroke; }
248
259
260private:
262
263 OdResult dwgInFields(OdDbDwgFiler *pFiler);
264 void dwgOutFields(OdDbDwgFiler *pFiler) const;
265 OdResult dxfInFields(OdDbDxfFiler *pFiler);
266 void dxfOutFields(OdDbDxfFiler *pFiler) const;
267
268#ifdef ODA_DIAGNOSTICS
269 void trace(OdUInt32 nSymbol) const;
270#endif
271};
272
273#include "TD_PackPop.h"
274
275#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)