14 #include <vlutil/vlString.h>
29 #define DtLineWidthFromAppearance(theAppr) ((theAppr >> 28) & 0x0000000F)
30 #define DtLineWidthToAppearance(theLineWidth) (theLineWidth << 28)
31 #define DtPenStyleFromAppearance(theAppr) ((theAppr >> 8) & 0x0000000F)
32 #define DtPenStyleToAppearance(theLineStyle) (theLineStyle << 8)
33 #define DtFillStyleFromAppearance(theAppr) ((theAppr >> 12) & 0x0000000F)
34 #define DtFillStyleToAppearance(theFillStyle) (theFillStyle << 12)
38 const std::string& label =
"",
int color = 0,
const std::string& overlayParent =
"",
39 bool projected =
false,
bool closed =
false,
int appearance = 0,
40 const std::string& attachedTo =
"",
const std::string& userData =
"",
41 const std::map<std::string, std::string>& extendedData = std::map<std::string, std::string>(),
42 const std::map<int, DtString>& extendedLabels = std::map<int, DtString>(),
47 , myOverlayParent(overlayParent)
48 , myIsProjected(projected)
49 , myIsClosedFigure(closed)
50 , myAppearance(appearance)
51 , myAttachedTo(attachedTo)
52 , myUserData(userData)
54 , myExtendedData(extendedData)
55 , myExtendedLabels(extendedLabels)
56 , myPhysicalLineHeight(0.)
57 , myPhysicalLineWidth(0.)
58 , myUUID(
DtUUID::nullUUID())
64 , myLabel(orig.myLabel)
65 , myColor(orig.myColor)
66 , myOverlayParent(orig.myOverlayParent)
67 , myIsProjected(orig.myIsProjected)
68 , myIsClosedFigure(orig.myIsClosedFigure)
69 , myAppearance(orig.myAppearance)
70 , myAttachedTo(orig.myAttachedTo)
71 , myUserData(orig.myUserData)
72 , myRequestId(orig.myRequestId)
73 , myExtendedData(orig.myExtendedData)
74 , myExtendedLabels(orig.myExtendedLabels)
75 , myPhysicalLineHeight(orig.myPhysicalLineHeight)
76 , myPhysicalLineWidth(orig.myPhysicalLineWidth)
81 void setExtendedLabels(
const std::map<int, DtString>& extendedData)
83 myExtendedLabels = extendedData;
86 const std::map<int, DtString>& extendedLabels()
const
88 return myExtendedLabels;
91 std::map<int, DtString>& extendedLabels()
93 return myExtendedLabels;
96 void setExtendedData(
const std::map<std::string, std::string>& extendedData)
98 myExtendedData = extendedData;
101 const std::map<std::string, std::string>& extendedData()
const
103 return myExtendedData;
106 std::map<std::string, std::string>& extendedData()
108 return myExtendedData;
111 void setPhysicalLineHeight(
float h)
113 myPhysicalLineHeight = h;
116 float physicalLineHeight()
const
118 return myPhysicalLineHeight;
121 void setPhysicalLineWidth(
float h)
123 myPhysicalLineWidth = h;
126 float physicalLineWidth()
const
128 return myPhysicalLineWidth;
131 void setName(
const std::string& n)
136 const std::string& name()
const
141 void setLabel(
const std::string& l)
146 const std::string& label()
const
161 void setOverlayParent(
const std::string& s)
166 const std::string& overlayParent()
const
168 return myOverlayParent;
171 void setIsProjected(
bool b)
176 bool isProjected()
const
178 return myIsProjected;
181 void setIsClosedFigure(
bool b)
183 myIsClosedFigure = b;
186 bool isClosedFigure()
const
188 return myIsClosedFigure;
191 void setAppearance(
int i)
196 int appearance()
const
198 return (rawAppearance() & DtAppearanceMask);
201 void setAttachedTo(
const std::string& a)
206 const std::string& attachedTo()
const
211 void setUserData(
const std::string& u)
216 const std::string& userData()
const
221 void setRequestId(
unsigned int id)
226 int requestId()
const
231 int rawAppearance()
const
236 void setPenStyle(
int i)
238 myAppearance = (rawAppearance() & 0xFFFFF0FF) | (i << 8);
243 int appearance = rawAppearance();
251 void setFillStyle(
int i)
253 myAppearance = (rawAppearance() & 0xFFFF0FFF) | (i << 12);
256 int fillStyle()
const
258 int appearance = rawAppearance();
263 void setLineWidth(
int i)
265 myAppearance = appearance() | (i << 28);
268 int lineWidth()
const