14 #include <vlutil/vlString.h>
28 #define DtLineWidthFromAppearance(theAppr) ((theAppr >> 28) & 0x0000000F)
29 #define DtLineWidthToAppearance(theLineWidth) (theLineWidth << 28)
30 #define DtPenStyleFromAppearance(theAppr) ((theAppr >> 8) & 0x0000000F)
31 #define DtPenStyleToAppearance(theLineStyle) (theLineStyle << 8)
32 #define DtFillStyleFromAppearance(theAppr) ((theAppr >> 12) & 0x0000000F)
33 #define DtFillStyleToAppearance(theFillStyle) (theFillStyle << 12)
37 const std::string& label =
"",
int color = 0,
const std::string& overlayParent =
"",
38 bool projected =
false,
bool closed =
false,
int appearance = 0,
39 const std::string& attachedTo =
"",
const std::string& userData =
"",
40 const std::map<std::string, std::string>& extendedData = std::map<std::string, std::string>(),
41 const std::map<int, DtString>& extendedLabels = std::map<int, DtString>(),
46 , myOverlayParent(overlayParent)
47 , myIsProjected(projected)
48 , myIsClosedFigure(closed)
49 , myAppearance(appearance)
50 , myAttachedTo(attachedTo)
51 , myUserData(userData)
53 , myExtendedData(extendedData)
54 , myExtendedLabels(extendedLabels)
55 , myPhysicalLineHeight(0.)
56 , myPhysicalLineWidth(0.)
62 , myLabel(orig.myLabel)
63 , myColor(orig.myColor)
64 , myOverlayParent(orig.myOverlayParent)
65 , myIsProjected(orig.myIsProjected)
66 , myIsClosedFigure(orig.myIsClosedFigure)
67 , myAppearance(orig.myAppearance)
68 , myAttachedTo(orig.myAttachedTo)
69 , myUserData(orig.myUserData)
70 , myRequestId(orig.myRequestId)
71 , myExtendedData(orig.myExtendedData)
72 , myExtendedLabels(orig.myExtendedLabels)
73 , myPhysicalLineHeight(orig.myPhysicalLineHeight)
74 , myPhysicalLineWidth(orig.myPhysicalLineWidth)
78 void setExtendedLabels(
const std::map<int, DtString>& extendedData)
80 myExtendedLabels = extendedData;
83 const std::map<int, DtString>& extendedLabels()
const
85 return myExtendedLabels;
88 std::map<int, DtString>& extendedLabels()
90 return myExtendedLabels;
93 void setExtendedData(
const std::map<std::string, std::string>& extendedData)
95 myExtendedData = extendedData;
98 const std::map<std::string, std::string>& extendedData()
const
100 return myExtendedData;
103 std::map<std::string, std::string>& extendedData()
105 return myExtendedData;
108 void setPhysicalLineHeight(
float h)
110 myPhysicalLineHeight = h;
113 float physicalLineHeight()
const
115 return myPhysicalLineHeight;
118 void setPhysicalLineWidth(
float h)
120 myPhysicalLineWidth = h;
123 float physicalLineWidth()
const
125 return myPhysicalLineWidth;
128 void setName(
const std::string& n)
133 const std::string& name()
const
138 void setLabel(
const std::string& l)
143 const std::string& label()
const
158 void setOverlayParent(
const std::string& s)
163 const std::string& overlayParent()
const
165 return myOverlayParent;
168 void setIsProjected(
bool b)
173 bool isProjected()
const
175 return myIsProjected;
178 void setIsClosedFigure(
bool b)
180 myIsClosedFigure = b;
183 bool isClosedFigure()
const
185 return myIsClosedFigure;
188 void setAppearance(
int i)
193 int appearance()
const
198 void setAttachedTo(
const std::string& a)
203 const std::string& attachedTo()
const
208 void setUserData(
const std::string& u)
213 const std::string& userData()
const
218 void setRequestId(
unsigned int id)
223 int requestId()
const
228 int rawAppearance()
const
233 void setPenStyle(
int i)
235 myAppearance = (rawAppearance() & 0xFFFFF0FF) | (i << 8);
240 int appearance = rawAppearance();
248 void setFillStyle(
int i)
250 myAppearance = (rawAppearance() & 0xFFFF0FFF) | (i << 12);
253 int fillStyle()
const
255 int appearance = rawAppearance();
260 void setLineWidth(
int i)
262 myAppearance = appearance() | (i << 28);
265 int lineWidth()
const