1 /****************************************************************************
2 ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved.
3 **
4 ** This file is part of the dxflib project.
5 **
6 ** This file is free software; you can redistribute it and/or modify
7 ** it under the terms of the GNU General Public License as published by
8 ** the Free Software Foundation; either version 2 of the License, or
9 ** (at your option) any later version.
10 **
11 ** Licensees holding valid dxflib Professional Edition licenses may use
12 ** this file in accordance with the dxflib Commercial License
13 ** Agreement provided with the Software.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** See http://www.ribbonsoft.com for further details.
19 **
20 ** Contact info@ribbonsoft.com if any conditions of this licensing are
21 ** not clear to you.
22 **
23 **********************************************************************/
24 
25 #ifndef DL_ENTITIES_H
26 #define DL_ENTITIES_H
27 
28 #include "dl_global.h"
29 
30 #include <string>
31 #include <vector>
32 
33 /**
34  * Layer Data.
35  */
36 struct DXFLIB_EXPORT DL_LayerData {
37     /**
38      * Constructor.
39      * Parameters: see member variables.
40      */
41     DL_LayerData(const std::string& name,
42                  int flags, bool off = false) :
nameDL_LayerData43         name(name), flags(flags), off(off) {
44     }
45 
46     /** Layer name. */
47     std::string name;
48     /** Layer flags. (1 = frozen, 2 = frozen by default, 4 = locked) */
49     int flags;
50     /** Layer is off */
51     bool off;
52 };
53 
54 
55 
56 /**
57  * Block Data.
58  */
59 struct DXFLIB_EXPORT DL_BlockData {
60     /**
61      * Constructor.
62      * Parameters: see member variables.
63      */
DL_BlockDataDL_BlockData64     DL_BlockData(const std::string& bName,
65                  int bFlags,
66                  double bbpx, double bbpy, double bbpz) {
67         name = bName;
68         flags = bFlags;
69         bpx = bbpx;
70         bpy = bbpy;
71         bpz = bbpz;
72     }
73 
74     /** Block name. */
75     std::string name;
76     /** Block flags. (not used currently) */
77     int flags;
78     /** X Coordinate of base point. */
79     double bpx;
80     /** Y Coordinate of base point. */
81     double bpy;
82     /** Z Coordinate of base point. */
83     double bpz;
84 };
85 
86 
87 /**
88  * Line Type Data.
89  */
90 struct DXFLIB_EXPORT DL_LinetypeData {
91     /**
92      * Constructor.
93      * Parameters: see member variables.
94      */
95     DL_LinetypeData(
96         const std::string& name,
97         const std::string& description,
98         int flags,
99         int numberOfDashes,
100         double patternLength,
101         double* pattern = NULL
102         )
nameDL_LinetypeData103         : name(name),
104         description(description),
105         flags(flags),
106         numberOfDashes(numberOfDashes),
107         patternLength(patternLength),
108         pattern(pattern)
109     {}
110 
111     /** Linetype name */
112     std::string name;
113     /** Linetype description */
114     std::string description;
115     /** Linetype flags */
116     int flags;
117     /** Number of dashes */
118     int numberOfDashes;
119     /** Pattern length */
120     double patternLength;
121     /** Pattern */
122     double* pattern;
123 };
124 
125 
126 
127 /**
128  * Text style data.
129  */
130 struct DXFLIB_EXPORT DL_StyleData {
131     /**
132      * Constructor
133      * Parameters: see member variables.
134      */
DL_StyleDataDL_StyleData135     DL_StyleData(
136         const std::string& name,
137         int flags,
138         double fixedTextHeight,
139         double widthFactor,
140         double obliqueAngle,
141         int textGenerationFlags,
142         double lastHeightUsed,
143         const std::string& primaryFontFile,
144         const std::string& bigFontFile
145         )
146         : name(name),
147         flags(flags),
148         fixedTextHeight(fixedTextHeight),
149         widthFactor(widthFactor),
150         obliqueAngle(obliqueAngle),
151         textGenerationFlags(textGenerationFlags),
152         lastHeightUsed(lastHeightUsed),
153         primaryFontFile(primaryFontFile),
154         bigFontFile(bigFontFile),
155         bold(false),
156         italic(false) {
157     }
158 
159     bool operator==(const DL_StyleData& other) {
160         // ignore lastHeightUsed:
161         return (name==other.name &&
162             flags==other.flags &&
163             fixedTextHeight==other.fixedTextHeight &&
164             widthFactor==other.widthFactor &&
165             obliqueAngle==other.obliqueAngle &&
166             textGenerationFlags==other.textGenerationFlags &&
167             primaryFontFile==other.primaryFontFile &&
168             bigFontFile==other.bigFontFile);
169     }
170 
171     /** Style name */
172     std::string name;
173     /** Style flags */
174     int flags;
175     /** Fixed text height or 0 for not fixed. */
176     double fixedTextHeight;
177     /** Width factor */
178     double widthFactor;
179     /** Oblique angle */
180     double obliqueAngle;
181     /** Text generation flags */
182     int textGenerationFlags;
183     /** Last height used */
184     double lastHeightUsed;
185     /** Primary font file name */
186     std::string primaryFontFile;
187     /** Big font file name */
188     std::string bigFontFile;
189 
190     bool bold;
191     bool italic;
192 };
193 
194 /**
195  * Point Data.
196  */
197 struct DXFLIB_EXPORT DL_PointData {
198     /**
199      * Constructor.
200      * Parameters: see member variables.
201      */
202     DL_PointData(double px=0.0, double py=0.0, double pz=0.0) {
203         x = px;
204         y = py;
205         z = pz;
206     }
207 
208     /*! X Coordinate of the point. */
209     double x;
210     /*! Y Coordinate of the point. */
211     double y;
212     /*! Z Coordinate of the point. */
213     double z;
214 };
215 
216 
217 
218 /**
219  * Line Data.
220  */
221 struct DXFLIB_EXPORT DL_LineData {
222     /**
223      * Constructor.
224      * Parameters: see member variables.
225      */
DL_LineDataDL_LineData226     DL_LineData(double lx1, double ly1, double lz1,
227                 double lx2, double ly2, double lz2) {
228         x1 = lx1;
229         y1 = ly1;
230         z1 = lz1;
231 
232         x2 = lx2;
233         y2 = ly2;
234         z2 = lz2;
235     }
236 
237     /*! X Start coordinate of the point. */
238     double x1;
239     /*! Y Start coordinate of the point. */
240     double y1;
241     /*! Z Start coordinate of the point. */
242     double z1;
243 
244     /*! X End coordinate of the point. */
245     double x2;
246     /*! Y End coordinate of the point. */
247     double y2;
248     /*! Z End coordinate of the point. */
249     double z2;
250 };
251 
252 /**
253  * XLine Data.
254  */
255 struct DXFLIB_EXPORT DL_XLineData {
256     /**
257      * Constructor.
258      * Parameters: see member variables.
259      */
DL_XLineDataDL_XLineData260     DL_XLineData(double bx, double by, double bz,
261                 double dx, double dy, double dz) :
262         bx(bx), by(by), bz(bz),
263         dx(dx), dy(dy), dz(dz) {
264     }
265 
266     /*! X base point. */
267     double bx;
268     /*! Y base point. */
269     double by;
270     /*! Z base point. */
271     double bz;
272 
273     /*! X direction vector. */
274     double dx;
275     /*! Y direction vector. */
276     double dy;
277     /*! Z direction vector. */
278     double dz;
279 };
280 
281 /**
282  * Ray Data.
283  */
284 struct DXFLIB_EXPORT DL_RayData {
285     /**
286      * Constructor.
287      * Parameters: see member variables.
288      */
DL_RayDataDL_RayData289     DL_RayData(double bx, double by, double bz,
290                double dx, double dy, double dz) :
291         bx(bx), by(by), bz(bz),
292         dx(dx), dy(dy), dz(dz) {
293     }
294 
295     /*! X base point. */
296     double bx;
297     /*! Y base point. */
298     double by;
299     /*! Z base point. */
300     double bz;
301 
302     /*! X direction vector. */
303     double dx;
304     /*! Y direction vector. */
305     double dy;
306     /*! Z direction vector. */
307     double dz;
308 };
309 
310 
311 
312 /**
313  * Arc Data.
314  */
315 struct DXFLIB_EXPORT DL_ArcData {
316     /**
317      * Constructor.
318      * Parameters: see member variables.
319      */
DL_ArcDataDL_ArcData320     DL_ArcData(double acx, double acy, double acz,
321                double aRadius,
322                double aAngle1, double aAngle2) {
323 
324         cx = acx;
325         cy = acy;
326         cz = acz;
327         radius = aRadius;
328         angle1 = aAngle1;
329         angle2 = aAngle2;
330     }
331 
332     /*! X Coordinate of center point. */
333     double cx;
334     /*! Y Coordinate of center point. */
335     double cy;
336     /*! Z Coordinate of center point. */
337     double cz;
338 
339     /*! Radius of arc. */
340     double radius;
341     /*! Startangle of arc in degrees. */
342     double angle1;
343     /*! Endangle of arc in degrees. */
344     double angle2;
345 };
346 
347 
348 
349 /**
350  * Circle Data.
351  */
352 struct DXFLIB_EXPORT DL_CircleData {
353     /**
354      * Constructor.
355      * Parameters: see member variables.
356      */
DL_CircleDataDL_CircleData357     DL_CircleData(double acx, double acy, double acz,
358                   double aRadius) {
359 
360         cx = acx;
361         cy = acy;
362         cz = acz;
363         radius = aRadius;
364     }
365 
366     /*! X Coordinate of center point. */
367     double cx;
368     /*! Y Coordinate of center point. */
369     double cy;
370     /*! Z Coordinate of center point. */
371     double cz;
372 
373     /*! Radius of arc. */
374     double radius;
375 };
376 
377 
378 
379 /**
380  * Polyline Data.
381  */
382 struct DXFLIB_EXPORT DL_PolylineData {
383     /**
384      * Constructor.
385      * Parameters: see member variables.
386      */
387     DL_PolylineData(int pNumber, int pMVerteces, int pNVerteces, int pFlags, double pElevation = 0.0) {
388         number = pNumber;
389         m = pMVerteces;
390         n = pNVerteces;
391         elevation = pElevation;
392         flags = pFlags;
393     }
394 
395     /*! Number of vertices in this polyline. */
396     unsigned int number;
397 
398     /*! Number of vertices in m direction if polyline is a polygon mesh. */
399     unsigned int m;
400 
401     /*! Number of vertices in n direction if polyline is a polygon mesh. */
402     unsigned int n;
403 
404     /*! elevation of the polyline. */
405     double elevation;
406 
407     /*! Flags */
408     int flags;
409 };
410 
411 
412 
413 /**
414  * Vertex Data.
415  */
416 struct DXFLIB_EXPORT DL_VertexData {
417     /**
418      * Constructor.
419      * Parameters: see member variables.
420      */
421     DL_VertexData(double px=0.0, double py=0.0, double pz=0.0,
422                   double pBulge=0.0) {
423         x = px;
424         y = py;
425         z = pz;
426         bulge = pBulge;
427     }
428 
429     /*! X Coordinate of the vertex. */
430     double x;
431     /*! Y Coordinate of the vertex. */
432     double y;
433     /*! Z Coordinate of the vertex. */
434     double z;
435     /*! Bulge of vertex.
436      * (The tangent of 1/4 of the arc angle or 0 for lines) */
437     double bulge;
438 };
439 
440 
441 /**
442  * Trace Data / solid data / 3d face data.
443  */
444 struct DXFLIB_EXPORT DL_TraceData {
DL_TraceDataDL_TraceData445     DL_TraceData() {
446         thickness = 0.0;
447         for (int i=0; i<4; i++) {
448             x[i] = 0.0;
449             y[i] = 0.0;
450             z[i] = 0.0;
451         }
452     }
453 
454     /**
455      * Constructor.
456      * Parameters: see member variables.
457      */
458     DL_TraceData(double sx1, double sy1, double sz1,
459                 double sx2, double sy2, double sz2,
460                 double sx3, double sy3, double sz3,
461                 double sx4, double sy4, double sz4,
462                 double sthickness=0.0) {
463 
464         thickness = sthickness;
465 
466         x[0] = sx1;
467         y[0] = sy1;
468         z[0] = sz1;
469 
470         x[1] = sx2;
471         y[1] = sy2;
472         z[1] = sz2;
473 
474         x[2] = sx3;
475         y[2] = sy3;
476         z[2] = sz3;
477 
478         x[3] = sx4;
479         y[3] = sy4;
480         z[3] = sz4;
481     }
482 
483     /*! Thickness */
484     double thickness;
485 
486     /*! Points */
487     double x[4];
488     double y[4];
489     double z[4];
490 };
491 
492 
493 
494 
495 
496 /**
497  * Solid Data.
498  */
499 typedef DL_TraceData DL_SolidData;
500 
501 
502 /**
503  * 3dface Data.
504  */
505 typedef DL_TraceData DL_3dFaceData;
506 
507 
508 /**
509  * Spline Data.
510  */
511 struct DXFLIB_EXPORT DL_SplineData {
512     /**
513      * Constructor.
514      * Parameters: see member variables.
515      */
DL_SplineDataDL_SplineData516     DL_SplineData(int degree,
517                   int nKnots,
518                   int nControl,
519                   int nFit,
520                   int flags) :
521         degree(degree),
522         nKnots(nKnots),
523         nControl(nControl),
524         nFit(nFit),
525         flags(flags) {
526     }
527 
528     /*! Degree of the spline curve. */
529     unsigned int degree;
530 
531     /*! Number of knots. */
532     unsigned int nKnots;
533 
534     /*! Number of control points. */
535     unsigned int nControl;
536 
537     /*! Number of fit points. */
538     unsigned int nFit;
539 
540     /*! Flags */
541     int flags;
542 
543     double tangentStartX;
544     double tangentStartY;
545     double tangentStartZ;
546     double tangentEndX;
547     double tangentEndY;
548     double tangentEndZ;
549 };
550 
551 
552 
553 /**
554  * Spline knot data.
555  */
556 struct DXFLIB_EXPORT DL_KnotData {
DL_KnotDataDL_KnotData557     DL_KnotData() {}
558     /**
559      * Constructor.
560      * Parameters: see member variables.
561      */
DL_KnotDataDL_KnotData562     DL_KnotData(double pk) {
563         k = pk;
564     }
565 
566     /*! Knot value. */
567     double k;
568 };
569 
570 
571 
572 /**
573  * Spline control point data.
574  */
575 struct DXFLIB_EXPORT DL_ControlPointData {
576     /**
577      * Constructor.
578      * Parameters: see member variables.
579      */
DL_ControlPointDataDL_ControlPointData580     DL_ControlPointData(double px, double py, double pz, double weight) {
581         x = px;
582         y = py;
583         z = pz;
584         w = weight;
585     }
586 
587     /*! X coordinate of the control point. */
588     double x;
589     /*! Y coordinate of the control point. */
590     double y;
591     /*! Z coordinate of the control point. */
592     double z;
593     /*! Weight of control point. */
594     double w;
595 };
596 
597 
598 
599 /**
600  * Spline fit point data.
601  */
602 struct DXFLIB_EXPORT DL_FitPointData {
603     /**
604      * Constructor.
605      * Parameters: see member variables.
606      */
DL_FitPointDataDL_FitPointData607     DL_FitPointData(double x, double y, double z) : x(x), y(y), z(z) {}
608 
609     /*! X coordinate of the fit point. */
610     double x;
611     /*! Y coordinate of the fit point. */
612     double y;
613     /*! Z coordinate of the fit point. */
614     double z;
615 };
616 
617 
618 
619 /**
620  * Ellipse Data.
621  */
622 struct DXFLIB_EXPORT DL_EllipseData {
623     /**
624      * Constructor.
625      * Parameters: see member variables.
626      */
DL_EllipseDataDL_EllipseData627     DL_EllipseData(double cx, double cy, double cz,
628                    double mx, double my, double mz,
629                    double ratio,
630                    double angle1, double angle2)
631         : cx(cx),
632           cy(cy),
633           cz(cz),
634           mx(mx),
635           my(my),
636           mz(mz),
637           ratio(ratio),
638           angle1(angle1),
639           angle2(angle2) {
640     }
641 
642     /*! X Coordinate of center point. */
643     double cx;
644     /*! Y Coordinate of center point. */
645     double cy;
646     /*! Z Coordinate of center point. */
647     double cz;
648 
649     /*! X coordinate of the endpoint of the major axis. */
650     double mx;
651     /*! Y coordinate of the endpoint of the major axis. */
652     double my;
653     /*! Z coordinate of the endpoint of the major axis. */
654     double mz;
655 
656     /*! Ratio of minor axis to major axis.. */
657     double ratio;
658     /*! Startangle of ellipse in rad. */
659     double angle1;
660     /*! Endangle of ellipse in rad. */
661     double angle2;
662 };
663 
664 
665 
666 /**
667  * Insert Data.
668  */
669 struct DXFLIB_EXPORT DL_InsertData {
670     /**
671      * Constructor.
672      * Parameters: see member variables.
673      */
DL_InsertDataDL_InsertData674     DL_InsertData(const std::string& name,
675                   double ipx, double ipy, double ipz,
676                   double sx, double sy, double sz,
677                   double angle,
678                   int cols, int rows,
679                   double colSp, double rowSp) :
680           name(name),
681           ipx(ipx), ipy(ipy), ipz(ipz),
682           sx(sx), sy(sy), sz(sz),
683           angle(angle),
684           cols(cols), rows(rows),
685           colSp(colSp), rowSp(rowSp) {
686     }
687 
688     /*! Name of the referred block. */
689     std::string name;
690     /*! X Coordinate of insertion point. */
691     double ipx;
692     /*! Y Coordinate of insertion point. */
693     double ipy;
694     /*! Z Coordinate of insertion point. */
695     double ipz;
696     /*! X Scale factor. */
697     double sx;
698     /*! Y Scale factor. */
699     double sy;
700     /*! Z Scale factor. */
701     double sz;
702     /*! Rotation angle in degrees. */
703     double angle;
704     /*! Number of colums if we insert an array of the block or 1. */
705     int cols;
706     /*! Number of rows if we insert an array of the block or 1. */
707     int rows;
708     /*! Values for the spacing between cols. */
709     double colSp;
710     /*! Values for the spacing between rows. */
711     double rowSp;
712 };
713 
714 
715 
716 /**
717  * MText Data.
718  */
719 struct DXFLIB_EXPORT DL_MTextData {
720     /**
721      * Constructor.
722      * Parameters: see member variables.
723      */
DL_MTextDataDL_MTextData724     DL_MTextData(double ipx, double ipy, double ipz,
725                  double dirx, double diry, double dirz,
726                  double height, double width,
727                  int attachmentPoint,
728                  int drawingDirection,
729                  int lineSpacingStyle,
730                  double lineSpacingFactor,
731                  const std::string& text,
732                  const std::string& style,
733                  double angle) :
734          ipx(ipx), ipy(ipy), ipz(ipz),
735          dirx(dirx), diry(diry), dirz(dirz),
736          height(height), width(width),
737          attachmentPoint(attachmentPoint),
738          drawingDirection(drawingDirection),
739          lineSpacingStyle(lineSpacingStyle),
740          lineSpacingFactor(lineSpacingFactor),
741          text(text),
742          style(style),
743          angle(angle) {
744 
745     }
746 
747     /*! X Coordinate of insertion point. */
748     double ipx;
749     /*! Y Coordinate of insertion point. */
750     double ipy;
751     /*! Z Coordinate of insertion point. */
752     double ipz;
753     /*! X Coordinate of X direction vector. */
754     double dirx;
755     /*! Y Coordinate of X direction vector. */
756     double diry;
757     /*! Z Coordinate of X direction vector. */
758     double dirz;
759     /*! Text height */
760     double height;
761     /*! Width of the text box. */
762     double width;
763     /**
764      * Attachment point.
765      *
766      * 1 = Top left, 2 = Top center, 3 = Top right,
767      * 4 = Middle left, 5 = Middle center, 6 = Middle right,
768      * 7 = Bottom left, 8 = Bottom center, 9 = Bottom right
769      */
770     int attachmentPoint;
771     /**
772      * Drawing direction.
773      *
774      * 1 = left to right, 3 = top to bottom, 5 = by style
775      */
776     int drawingDirection;
777     /**
778      * Line spacing style.
779      *
780      * 1 = at least, 2 = exact
781      */
782     int lineSpacingStyle;
783     /**
784      * Line spacing factor. 0.25 .. 4.0
785      */
786     double lineSpacingFactor;
787     /*! Text string. */
788     std::string text;
789     /*! Style string. */
790     std::string style;
791     /*! Rotation angle. */
792     double angle;
793 };
794 
795 
796 
797 /**
798  * Text Data.
799  */
800 struct DXFLIB_EXPORT DL_TextData {
801     /**
802      * Constructor.
803      * Parameters: see member variables.
804      */
DL_TextDataDL_TextData805     DL_TextData(double ipx, double ipy, double ipz,
806                 double apx, double apy, double apz,
807                 double height, double xScaleFactor,
808                 int textGenerationFlags,
809                 int hJustification,
810                 int vJustification,
811                 const std::string& text,
812                 const std::string& style,
813                 double angle)
814         : ipx(ipx), ipy(ipy), ipz(ipz),
815           apx(apx), apy(apy), apz(apz),
816           height(height), xScaleFactor(xScaleFactor),
817           textGenerationFlags(textGenerationFlags),
818           hJustification(hJustification),
819           vJustification(vJustification),
820           text(text),
821           style(style),
822           angle(angle) {
823     }
824 
825     /*! X Coordinate of insertion point. */
826     double ipx;
827     /*! Y Coordinate of insertion point. */
828     double ipy;
829     /*! Z Coordinate of insertion point. */
830     double ipz;
831 
832     /*! X Coordinate of alignment point. */
833     double apx;
834     /*! Y Coordinate of alignment point. */
835     double apy;
836     /*! Z Coordinate of alignment point. */
837     double apz;
838 
839     /*! Text height */
840     double height;
841     /*! Relative X scale factor. */
842     double xScaleFactor;
843     /*! 0 = default, 2 = Backwards, 4 = Upside down */
844     int textGenerationFlags;
845     /**
846      * Horizontal justification.
847      *
848      * 0 = Left (default), 1 = Center, 2 = Right,
849      * 3 = Aligned, 4 = Middle, 5 = Fit
850      * For 3, 4, 5 the vertical alignment has to be 0.
851      */
852     int hJustification;
853     /**
854      * Vertical justification.
855      *
856      * 0 = Baseline (default), 1 = Bottom, 2 = Middle, 3= Top
857      */
858     int vJustification;
859     /*! Text string. */
860     std::string text;
861     /*! Style (font). */
862     std::string style;
863     /*! Rotation angle of dimension text away from default orientation. */
864     double angle;
865 };
866 
867 /**
868  * Arc Aligned Text Data.
869  */
870 struct DXFLIB_EXPORT DL_ArcAlignedTextData {
871 
872     /*! Text string */
873     std::string text;
874     /*! Font name */
875     std::string font;
876     /*! Style */
877     std::string style;
878 
879     /*! X coordinate of arc center point. */
880     double cx;
881     /*! Y coordinate of arc center point. */
882     double cy;
883     /*! Z coordinate of arc center point. */
884     double cz;
885     /*! Arc radius. */
886     double radius;
887 
888     /*! Relative X scale factor. */
889     double xScaleFactor;
890     /*! Text height */
891     double height;
892     /*! Character spacing */
893     double spacing;
894     /*! Offset from arc */
895     double offset;
896     /*! Right offset */
897     double rightOffset;
898     /*! Left offset */
899     double leftOffset;
900     /*! Start angle (radians) */
901     double startAngle;
902     /*! End angle (radians) */
903     double endAngle;
904     /*! Reversed character order:
905      * false: normal
906      * true: reversed
907      */
908     bool reversedCharacterOrder;
909     /*! Direction
910      * 1: outward from center
911      * 2: inward from center
912      */
913     int direction;
914     /*! Alignment:
915      * 1: fit
916      * 2: left
917      * 3: right
918      * 4: center
919      */
920     int alignment;
921     /*! Side
922      * 1: convex
923      * 2: concave
924      */
925     int side;
926     /*! Bold flag */
927     bool bold;
928     /*! Italic flag */
929     bool italic;
930     /*! Underline flag */
931     bool underline;
932     /*! Character set value. Windows character set identifier. */
933     int characerSet;
934     /*! Pitch and family value. Windows pitch and character family identifier. */
935     int pitch;
936     /*! Font type:
937      * false: TTF
938      * true: SHX
939      */
940     bool shxFont;
941     /*! Wizard flag */
942     bool wizard;
943     /*! Arc handle/ID */
944     int arcHandle;
945 };
946 
947 /**
948  * Block attribute data.
949  */
950 struct DXFLIB_EXPORT DL_AttributeData : public DL_TextData {
DL_AttributeDataDL_AttributeData951     DL_AttributeData(const DL_TextData& tData, const std::string& tag)
952         : DL_TextData(tData), tag(tag) {
953 
954     }
955 
956     /**
957      * Constructor.
958      * Parameters: see member variables.
959      */
DL_AttributeDataDL_AttributeData960     DL_AttributeData(double ipx, double ipy, double ipz,
961                 double apx, double apy, double apz,
962                 double height, double xScaleFactor,
963                 int textGenerationFlags,
964                 int hJustification,
965                 int vJustification,
966                 const std::string& tag,
967                 const std::string& text,
968                 const std::string& style,
969                 double angle)
970         : DL_TextData(ipx, ipy, ipz,
971                 apx, apy, apz,
972                 height, xScaleFactor,
973                 textGenerationFlags,
974                 hJustification,
975                 vJustification,
976                 text,
977                 style,
978                 angle),
979           tag(tag) {
980     }
981 
982     /*! Tag. */
983     std::string tag;
984 };
985 
986 
987 /**
988  * Generic Dimension Data.
989  */
990 struct DXFLIB_EXPORT DL_DimensionData {
991     /**
992     * Constructor.
993     * Parameters: see member variables.
994     */
995     DL_DimensionData(double dpx, double dpy, double dpz,
996                      double mpx, double mpy, double mpz,
997                      int type,
998                      int attachmentPoint,
999                      int lineSpacingStyle,
1000                      double lineSpacingFactor,
1001                      const std::string& text,
1002                      const std::string& style,
1003                      double angle,
1004                      double linearFactor = 1.0,
1005                      double dimScale = 1.0) :
dpxDL_DimensionData1006         dpx(dpx), dpy(dpy), dpz(dpz),
1007         mpx(mpx), mpy(mpy), mpz(mpz),
1008         type(type),
1009         attachmentPoint(attachmentPoint),
1010         lineSpacingStyle(lineSpacingStyle),
1011         lineSpacingFactor(lineSpacingFactor),
1012         text(text),
1013         style(style),
1014         angle(angle),
1015         linearFactor(linearFactor),
1016         dimScale(dimScale) {
1017 
1018     }
1019 
1020     /*! X Coordinate of definition point. */
1021     double dpx;
1022     /*! Y Coordinate of definition point. */
1023     double dpy;
1024     /*! Z Coordinate of definition point. */
1025     double dpz;
1026     /*! X Coordinate of middle point of the text. */
1027     double mpx;
1028     /*! Y Coordinate of middle point of the text. */
1029     double mpy;
1030     /*! Z Coordinate of middle point of the text. */
1031     double mpz;
1032     /**
1033      * Dimension type.
1034      *
1035      * 0   Rotated, horizontal, or vertical
1036      * 1   Aligned
1037      * 2   Angular
1038      * 3   Diametric
1039      * 4   Radius
1040      * 5   Angular 3-point
1041      * 6   Ordinate
1042      * 64  Ordinate type. This is a bit value (bit 7)
1043      *     used only with integer value 6. If set,
1044      *     ordinate is X-type; if not set, ordinate is
1045      *     Y-type
1046      * 128 This is a bit value (bit 8) added to the
1047      *     other group 70 values if the dimension text
1048      *     has been positioned at a user-defined
1049      *    location rather than at the default location
1050      */
1051     int type;
1052     /**
1053      * Attachment point.
1054      *
1055      * 1 = Top left, 2 = Top center, 3 = Top right,
1056      * 4 = Middle left, 5 = Middle center, 6 = Middle right,
1057      * 7 = Bottom left, 8 = Bottom center, 9 = Bottom right,
1058      */
1059     int attachmentPoint;
1060     /**
1061      * Line spacing style.
1062      *
1063      * 1 = at least, 2 = exact
1064      */
1065     int lineSpacingStyle;
1066     /**
1067      * Line spacing factor. 0.25 .. 4.0
1068      */
1069     double lineSpacingFactor;
1070     /**
1071      * Text string.
1072      *
1073      * Text string entered explicitly by user or null
1074      * or "<>" for the actual measurement or " " (one blank space).
1075      * for supressing the text.
1076      */
1077     std::string text;
1078     /*! Dimension style (font name). */
1079     std::string style;
1080     /**
1081      * Rotation angle of dimension text away from
1082      * default orientation.
1083      */
1084     double angle;
1085     /**
1086      * Linear factor style override.
1087      */
1088     double linearFactor;
1089     /**
1090      * Dimension scale (dimscale) style override.
1091      */
1092     double dimScale;
1093     bool arrow1Flipped;
1094     bool arrow2Flipped;
1095 };
1096 
1097 
1098 
1099 /**
1100  * Aligned Dimension Data.
1101  */
1102 struct DXFLIB_EXPORT DL_DimAlignedData {
1103     /**
1104      * Constructor.
1105      * Parameters: see member variables.
1106      */
DL_DimAlignedDataDL_DimAlignedData1107     DL_DimAlignedData(double depx1, double depy1, double depz1,
1108                       double depx2, double depy2, double depz2) {
1109 
1110         epx1 = depx1;
1111         epy1 = depy1;
1112         epz1 = depz1;
1113 
1114         epx2 = depx2;
1115         epy2 = depy2;
1116         epz2 = depz2;
1117     }
1118 
1119     /*! X Coordinate of Extension point 1. */
1120     double epx1;
1121     /*! Y Coordinate of Extension point 1. */
1122     double epy1;
1123     /*! Z Coordinate of Extension point 1. */
1124     double epz1;
1125 
1126     /*! X Coordinate of Extension point 2. */
1127     double epx2;
1128     /*! Y Coordinate of Extension point 2. */
1129     double epy2;
1130     /*! Z Coordinate of Extension point 2. */
1131     double epz2;
1132 };
1133 
1134 
1135 
1136 /**
1137  * Linear (rotated) Dimension Data.
1138  */
1139 struct DXFLIB_EXPORT DL_DimLinearData {
1140     /**
1141      * Constructor.
1142      * Parameters: see member variables.
1143      */
DL_DimLinearDataDL_DimLinearData1144     DL_DimLinearData(double ddpx1, double ddpy1, double ddpz1,
1145                      double ddpx2, double ddpy2, double ddpz2,
1146                      double dAngle, double dOblique) {
1147 
1148         dpx1 = ddpx1;
1149         dpy1 = ddpy1;
1150         dpz1 = ddpz1;
1151 
1152         dpx2 = ddpx2;
1153         dpy2 = ddpy2;
1154         dpz2 = ddpz2;
1155 
1156         angle = dAngle;
1157         oblique = dOblique;
1158     }
1159 
1160     /*! X Coordinate of Extension point 1. */
1161     double dpx1;
1162     /*! Y Coordinate of Extension point 1. */
1163     double dpy1;
1164     /*! Z Coordinate of Extension point 1. */
1165     double dpz1;
1166 
1167     /*! X Coordinate of Extension point 2. */
1168     double dpx2;
1169     /*! Y Coordinate of Extension point 2. */
1170     double dpy2;
1171     /*! Z Coordinate of Extension point 2. */
1172     double dpz2;
1173 
1174     /*! Rotation angle (angle of dimension line) in degrees. */
1175     double angle;
1176     /*! Oblique angle in degrees. */
1177     double oblique;
1178 };
1179 
1180 
1181 
1182 /**
1183  * Radial Dimension Data.
1184  */
1185 struct DXFLIB_EXPORT DL_DimRadialData {
1186     /**
1187      * Constructor.
1188      * Parameters: see member variables.
1189      */
DL_DimRadialDataDL_DimRadialData1190     DL_DimRadialData(double ddpx, double ddpy, double ddpz, double dleader) {
1191         dpx = ddpx;
1192         dpy = ddpy;
1193         dpz = ddpz;
1194 
1195         leader = dleader;
1196     }
1197 
1198     /*! X Coordinate of definition point. */
1199     double dpx;
1200     /*! Y Coordinate of definition point. */
1201     double dpy;
1202     /*! Z Coordinate of definition point. */
1203     double dpz;
1204 
1205     /*! Leader length */
1206     double leader;
1207 };
1208 
1209 
1210 
1211 /**
1212  * Diametric Dimension Data.
1213  */
1214 struct DXFLIB_EXPORT DL_DimDiametricData {
1215     /**
1216      * Constructor.
1217      * Parameters: see member variables.
1218      */
DL_DimDiametricDataDL_DimDiametricData1219     DL_DimDiametricData(double ddpx, double ddpy, double ddpz, double dleader) {
1220         dpx = ddpx;
1221         dpy = ddpy;
1222         dpz = ddpz;
1223 
1224         leader = dleader;
1225     }
1226 
1227     /*! X Coordinate of definition point (DXF 15). */
1228     double dpx;
1229     /*! Y Coordinate of definition point (DXF 25). */
1230     double dpy;
1231     /*! Z Coordinate of definition point (DXF 35). */
1232     double dpz;
1233 
1234     /*! Leader length */
1235     double leader;
1236 };
1237 
1238 
1239 
1240 /**
1241  * Angular Dimension Data.
1242  */
1243 struct DXFLIB_EXPORT DL_DimAngular2LData {
1244     /**
1245      * Constructor.
1246      * Parameters: see member variables.
1247      */
DL_DimAngular2LDataDL_DimAngular2LData1248     DL_DimAngular2LData(double ddpx1, double ddpy1, double ddpz1,
1249                       double ddpx2, double ddpy2, double ddpz2,
1250                       double ddpx3, double ddpy3, double ddpz3,
1251                       double ddpx4, double ddpy4, double ddpz4) {
1252 
1253         dpx1 = ddpx1;
1254         dpy1 = ddpy1;
1255         dpz1 = ddpz1;
1256 
1257         dpx2 = ddpx2;
1258         dpy2 = ddpy2;
1259         dpz2 = ddpz2;
1260 
1261         dpx3 = ddpx3;
1262         dpy3 = ddpy3;
1263         dpz3 = ddpz3;
1264 
1265         dpx4 = ddpx4;
1266         dpy4 = ddpy4;
1267         dpz4 = ddpz4;
1268     }
1269 
1270     /*! X Coordinate of definition point 1. */
1271     double dpx1;
1272     /*! Y Coordinate of definition point 1. */
1273     double dpy1;
1274     /*! Z Coordinate of definition point 1. */
1275     double dpz1;
1276 
1277     /*! X Coordinate of definition point 2. */
1278     double dpx2;
1279     /*! Y Coordinate of definition point 2. */
1280     double dpy2;
1281     /*! Z Coordinate of definition point 2. */
1282     double dpz2;
1283 
1284     /*! X Coordinate of definition point 3. */
1285     double dpx3;
1286     /*! Y Coordinate of definition point 3. */
1287     double dpy3;
1288     /*! Z Coordinate of definition point 3. */
1289     double dpz3;
1290 
1291     /*! X Coordinate of definition point 4. */
1292     double dpx4;
1293     /*! Y Coordinate of definition point 4. */
1294     double dpy4;
1295     /*! Z Coordinate of definition point 4. */
1296     double dpz4;
1297 };
1298 
1299 
1300 /**
1301  * Angular Dimension Data (3 points version).
1302  */
1303 struct DXFLIB_EXPORT DL_DimAngular3PData {
1304     /**
1305      * Constructor.
1306      * Parameters: see member variables.
1307      */
DL_DimAngular3PDataDL_DimAngular3PData1308     DL_DimAngular3PData(double ddpx1, double ddpy1, double ddpz1,
1309                         double ddpx2, double ddpy2, double ddpz2,
1310                         double ddpx3, double ddpy3, double ddpz3) {
1311 
1312         dpx1 = ddpx1;
1313         dpy1 = ddpy1;
1314         dpz1 = ddpz1;
1315 
1316         dpx2 = ddpx2;
1317         dpy2 = ddpy2;
1318         dpz2 = ddpz2;
1319 
1320         dpx3 = ddpx3;
1321         dpy3 = ddpy3;
1322         dpz3 = ddpz3;
1323     }
1324 
1325     /*! X Coordinate of definition point 1 (extension line 1 end). */
1326     double dpx1;
1327     /*! Y Coordinate of definition point 1. */
1328     double dpy1;
1329     /*! Z Coordinate of definition point 1. */
1330     double dpz1;
1331 
1332     /*! X Coordinate of definition point 2 (extension line 2 end). */
1333     double dpx2;
1334     /*! Y Coordinate of definition point 2. */
1335     double dpy2;
1336     /*! Z Coordinate of definition point 2. */
1337     double dpz2;
1338 
1339     /*! X Coordinate of definition point 3 (center). */
1340     double dpx3;
1341     /*! Y Coordinate of definition point 3. */
1342     double dpy3;
1343     /*! Z Coordinate of definition point 3. */
1344     double dpz3;
1345 };
1346 
1347 
1348 
1349 /**
1350  * Ordinate Dimension Data.
1351  */
1352 struct DXFLIB_EXPORT DL_DimOrdinateData {
1353     /**
1354      * Constructor.
1355      * Parameters: see member variables.
1356      */
DL_DimOrdinateDataDL_DimOrdinateData1357     DL_DimOrdinateData(double ddpx1, double ddpy1, double ddpz1,
1358                       double ddpx2, double ddpy2, double ddpz2,
1359                       bool dxtype) {
1360 
1361         dpx1 = ddpx1;
1362         dpy1 = ddpy1;
1363         dpz1 = ddpz1;
1364 
1365         dpx2 = ddpx2;
1366         dpy2 = ddpy2;
1367         dpz2 = ddpz2;
1368 
1369         xtype = dxtype;
1370     }
1371 
1372     /*! X Coordinate of definition point 1. */
1373     double dpx1;
1374     /*! Y Coordinate of definition point 1. */
1375     double dpy1;
1376     /*! Z Coordinate of definition point 1. */
1377     double dpz1;
1378 
1379     /*! X Coordinate of definition point 2. */
1380     double dpx2;
1381     /*! Y Coordinate of definition point 2. */
1382     double dpy2;
1383     /*! Z Coordinate of definition point 2. */
1384     double dpz2;
1385 
1386     /*! True if the dimension indicates the X-value, false for Y-value */
1387     bool xtype;
1388 };
1389 
1390 
1391 
1392 /**
1393  * Leader (arrow).
1394  */
1395 struct DXFLIB_EXPORT DL_LeaderData {
1396     /**
1397      * Constructor.
1398      * Parameters: see member variables.
1399      */
1400     DL_LeaderData(int arrowHeadFlag,
1401                   int leaderPathType,
1402                   int leaderCreationFlag,
1403                   int hooklineDirectionFlag,
1404                   int hooklineFlag,
1405                   double textAnnotationHeight,
1406                   double textAnnotationWidth,
1407                   int number,
1408                   double dimScale = 1.0) :
arrowHeadFlagDL_LeaderData1409         arrowHeadFlag(arrowHeadFlag),
1410         leaderPathType(leaderPathType),
1411         leaderCreationFlag(leaderCreationFlag),
1412         hooklineDirectionFlag(hooklineDirectionFlag),
1413         hooklineFlag(hooklineFlag),
1414         textAnnotationHeight(textAnnotationHeight),
1415         textAnnotationWidth(textAnnotationWidth),
1416         number(number),
1417         dimScale(dimScale) {
1418 
1419     }
1420 
1421     /*! Arrow head flag (71). */
1422     int arrowHeadFlag;
1423     /*! Leader path type (72). */
1424     int leaderPathType;
1425     /*! Leader creation flag (73). */
1426     int leaderCreationFlag;
1427     /*! Hookline direction flag (74). */
1428     int hooklineDirectionFlag;
1429     /*! Hookline flag (75) */
1430     int hooklineFlag;
1431     /*! Text annotation height (40). */
1432     double textAnnotationHeight;
1433     /*! Text annotation width (41) */
1434     double textAnnotationWidth;
1435     /*! Number of vertices in leader (76). */
1436     int number;
1437     /*! Dimension scale (dimscale) style override. */
1438     double dimScale;
1439 };
1440 
1441 
1442 
1443 /**
1444  * Leader Vertex Data.
1445  */
1446 struct DXFLIB_EXPORT DL_LeaderVertexData {
1447     /**
1448      * Constructor.
1449      * Parameters: see member variables.
1450      */
1451     DL_LeaderVertexData(double px=0.0, double py=0.0, double pz=0.0) {
1452         x = px;
1453         y = py;
1454         z = pz;
1455     }
1456 
1457     /*! X Coordinate of the vertex. */
1458     double x;
1459     /*! Y Coordinate of the vertex. */
1460     double y;
1461     /*! Z Coordinate of the vertex. */
1462     double z;
1463 };
1464 
1465 
1466 
1467 /**
1468  * Hatch data.
1469  */
1470 struct DXFLIB_EXPORT DL_HatchData {
1471     /**
1472      * Default constructor.
1473      */
DL_HatchDataDL_HatchData1474     DL_HatchData() {}
1475 
1476     /**
1477      * Constructor.
1478      * Parameters: see member variables.
1479      */
1480     DL_HatchData(int numLoops,
1481                  bool solid,
1482                  double scale,
1483                  double angle,
1484                  const std::string& pattern,
1485                  double originX = 0.0,
1486                  double originY = 0.0) :
numLoopsDL_HatchData1487         numLoops(numLoops),
1488         solid(solid),
1489         scale(scale),
1490         angle(angle),
1491         pattern(pattern),
1492         originX(originX),
1493         originY(originY) {
1494 
1495     }
1496 
1497     /*! Number of boundary paths (loops). */
1498     int numLoops;
1499     /*! Solid fill flag (true=solid, false=pattern). */
1500     bool solid;
1501     /*! Pattern scale or spacing */
1502     double scale;
1503     /*! Pattern angle in degrees */
1504     double angle;
1505     /*! Pattern name. */
1506     std::string pattern;
1507     /*! Pattern origin */
1508     double originX;
1509     double originY;
1510 };
1511 
1512 
1513 
1514 /**
1515  * Hatch boundary path (loop) data.
1516  */
1517 struct DXFLIB_EXPORT DL_HatchLoopData {
1518     /**
1519      * Default constructor.
1520      */
DL_HatchLoopDataDL_HatchLoopData1521     DL_HatchLoopData() {}
1522     /**
1523      * Constructor.
1524      * Parameters: see member variables.
1525      */
DL_HatchLoopDataDL_HatchLoopData1526     DL_HatchLoopData(int hNumEdges) {
1527         numEdges = hNumEdges;
1528     }
1529 
1530     /*! Number of edges in this loop. */
1531     int numEdges;
1532 };
1533 
1534 
1535 
1536 /**
1537  * Hatch edge data.
1538  */
1539 struct DXFLIB_EXPORT DL_HatchEdgeData {
1540     /**
1541      * Default constructor.
1542      */
DL_HatchEdgeDataDL_HatchEdgeData1543     DL_HatchEdgeData() : defined(false), x1(0.0), y1(0.0), x2(0.0), y2(0.0) {
1544     }
1545 
1546     /**
1547      * Constructor for a line edge.
1548      * Parameters: see member variables.
1549      */
DL_HatchEdgeDataDL_HatchEdgeData1550     DL_HatchEdgeData(double x1, double y1,
1551                      double x2, double y2) :
1552         defined(true),
1553         type(1),
1554         x1(x1),
1555         y1(y1),
1556         x2(x2),
1557         y2(y2) {
1558     }
1559 
1560     /**
1561      * Constructor for an arc edge.
1562      * Parameters: see member variables.
1563      */
DL_HatchEdgeDataDL_HatchEdgeData1564     DL_HatchEdgeData(double cx, double cy,
1565                      double radius,
1566                      double angle1, double angle2,
1567                      bool ccw) :
1568         defined(true),
1569         type(2),
1570         cx(cx),
1571         cy(cy),
1572         radius(radius),
1573         angle1(angle1),
1574         angle2(angle2),
1575         ccw(ccw) {
1576     }
1577 
1578     /**
1579      * Constructor for an ellipse arc edge.
1580      * Parameters: see member variables.
1581      */
DL_HatchEdgeDataDL_HatchEdgeData1582     DL_HatchEdgeData(double cx, double cy,
1583                      double mx, double my,
1584                      double ratio,
1585                      double angle1, double angle2,
1586                      bool ccw) :
1587         defined(true),
1588         type(3),
1589         cx(cx),
1590         cy(cy),
1591         angle1(angle1),
1592         angle2(angle2),
1593         ccw(ccw),
1594         mx(mx),
1595         my(my),
1596         ratio(ratio) {
1597     }
1598 
1599     /**
1600      * Constructor for a spline edge.
1601      * Parameters: see member variables.
1602      */
DL_HatchEdgeDataDL_HatchEdgeData1603     DL_HatchEdgeData(unsigned int degree,
1604                      bool rational,
1605                      bool periodic,
1606                      unsigned int nKnots,
1607                      unsigned int nControl,
1608                      unsigned int nFit,
1609                      const std::vector<double>& knots,
1610                      const std::vector<std::vector<double> >& controlPoints,
1611                      const std::vector<std::vector<double> >& fitPoints,
1612                      const std::vector<double>& weights,
1613                      double startTangentX,
1614                      double startTangentY,
1615                      double endTangentX,
1616                      double endTangentY) :
1617         defined(true),
1618         type(4),
1619         degree(degree),
1620         rational(rational),
1621         periodic(periodic),
1622         nKnots(nKnots),
1623         nControl(nControl),
1624         nFit(nFit),
1625         controlPoints(controlPoints),
1626         knots(knots),
1627         weights(weights),
1628         fitPoints(fitPoints),
1629         startTangentX(startTangentX),
1630         startTangentY(startTangentY),
1631         endTangentX(endTangentX),
1632         endTangentY(endTangentY) {
1633     }
1634 
1635     /**
1636      * Set to true if this edge is fully defined.
1637      */
1638     bool defined;
1639 
1640     /**
1641      * Edge type. 1=line, 2=arc, 3=elliptic arc, 4=spline.
1642      */
1643     int type;
1644 
1645     // line edges:
1646 
1647     /*! Start point (X). */
1648     double x1;
1649     /*! Start point (Y). */
1650     double y1;
1651     /*! End point (X). */
1652     double x2;
1653     /*! End point (Y). */
1654     double y2;
1655 
1656     /*! Center point of arc or ellipse arc (X). */
1657     double cx;
1658     /*! Center point of arc or ellipse arc (Y). */
1659     double cy;
1660     /*! Arc radius. */
1661     double radius;
1662     /*! Start angle of arc or ellipse arc. */
1663     double angle1;
1664     /*! End angle of arc or ellipse arc. */
1665     double angle2;
1666     /*! Counterclockwise flag for arc or ellipse arc. */
1667     bool ccw;
1668 
1669     /*! Major axis end point (X). */
1670     double mx;
1671     /*! Major axis end point (Y). */
1672     double my;
1673     /*! Axis ratio */
1674     double ratio;
1675 
1676 
1677     /*! Spline degree */
1678     unsigned int degree;
1679     bool rational;
1680     bool periodic;
1681     /*! Number of knots. */
1682     unsigned int nKnots;
1683     /*! Number of control points. */
1684     unsigned int nControl;
1685     /*! Number of fit points. */
1686     unsigned int nFit;
1687 
1688     std::vector<std::vector<double> > controlPoints;
1689     std::vector<double> knots;
1690     std::vector<double> weights;
1691     std::vector<std::vector<double> > fitPoints;
1692 
1693     double startTangentX;
1694     double startTangentY;
1695 
1696     double endTangentX;
1697     double endTangentY;
1698 
1699     /** Polyline boundary vertices (x y [bulge])*/
1700     std::vector<std::vector<double> > vertices;
1701     //bool closed;
1702 };
1703 
1704 
1705 
1706 /**
1707  * Image Data.
1708  */
1709 struct DXFLIB_EXPORT DL_ImageData {
1710     /**
1711      * Constructor.
1712      * Parameters: see member variables.
1713      */
DL_ImageDataDL_ImageData1714     DL_ImageData(const std::string& iref,
1715                   double iipx, double iipy, double iipz,
1716                   double iux, double iuy, double iuz,
1717                   double ivx, double ivy, double ivz,
1718                   int iwidth, int iheight,
1719                   int ibrightness, int icontrast, int ifade) {
1720         ref = iref;
1721         ipx = iipx;
1722         ipy = iipy;
1723         ipz = iipz;
1724         ux = iux;
1725         uy = iuy;
1726         uz = iuz;
1727         vx = ivx;
1728         vy = ivy;
1729         vz = ivz;
1730         width = iwidth;
1731         height = iheight;
1732         brightness = ibrightness;
1733         contrast = icontrast;
1734         fade = ifade;
1735     }
1736 
1737     /*! Reference to the image file
1738         (unique, used to refer to the image def object). */
1739     std::string ref;
1740     /*! X Coordinate of insertion point. */
1741     double ipx;
1742     /*! Y Coordinate of insertion point. */
1743     double ipy;
1744     /*! Z Coordinate of insertion point. */
1745     double ipz;
1746     /*! X Coordinate of u vector along bottom of image. */
1747     double ux;
1748     /*! Y Coordinate of u vector along bottom of image. */
1749     double uy;
1750     /*! Z Coordinate of u vector along bottom of image. */
1751     double uz;
1752     /*! X Coordinate of v vector along left side of image. */
1753     double vx;
1754     /*! Y Coordinate of v vector along left side of image. */
1755     double vy;
1756     /*! Z Coordinate of v vector along left side of image. */
1757     double vz;
1758     /*! Width of image in pixel. */
1759     int width;
1760     /*! Height of image in pixel. */
1761     int height;
1762     /*! Brightness (0..100, default = 50). */
1763     int brightness;
1764     /*! Contrast (0..100, default = 50). */
1765     int contrast;
1766     /*! Fade (0..100, default = 0). */
1767     int fade;
1768 };
1769 
1770 
1771 
1772 /**
1773  * Image Definition Data.
1774  */
1775 struct DXFLIB_EXPORT DL_ImageDefData {
1776     /**
1777      * Constructor.
1778      * Parameters: see member variables.
1779      */
DL_ImageDefDataDL_ImageDefData1780     DL_ImageDefData(const std::string& iref,
1781                  const std::string& ifile) {
1782         ref = iref;
1783         file = ifile;
1784     }
1785 
1786     /*! Reference to the image file
1787         (unique, used to refer to the image def object). */
1788     std::string ref;
1789 
1790     /*! Image file */
1791     std::string file;
1792 };
1793 
1794 
1795 
1796 /**
1797  * Dictionary data.
1798  */
1799 struct DXFLIB_EXPORT DL_DictionaryData {
DL_DictionaryDataDL_DictionaryData1800     DL_DictionaryData(const std::string& handle) : handle(handle) {}
1801     std::string handle;
1802 };
1803 
1804 
1805 
1806 /**
1807  * Dictionary entry data.
1808  */
1809 struct DXFLIB_EXPORT DL_DictionaryEntryData {
DL_DictionaryEntryDataDL_DictionaryEntryData1810     DL_DictionaryEntryData(const std::string& name, const std::string& handle) :
1811         name(name), handle(handle) {}
1812 
1813     std::string name;
1814     std::string handle;
1815 };
1816 
1817 #endif
1818 
1819 // EOF
1820