CGM Objects Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
CgmObj.h
1 // CgmObj.h - interface for CCgmBaseObj and derivatives
2 //
5 
6 #ifdef WIN32
7 #pragma warning(4: 4640)
8 #endif
9 
10 #ifndef __DRAWOBJ_H__
11 #define __DRAWOBJ_H__
12 
13 #define _USE_MATH_DEFINES
14 #include <cmath>
15 
16 #include "Utility/wstring.h"
17 
18 
19  #define TX_NIST 7
20  #define TX_IGNORE 8
21 
22  #ifdef WIN32
23  # define MAXPATHLEN _MAX_PATH
24  #else
25  # define MAXPATHLEN 1024
26  #endif
27 
28  #define RGB2ULONG(r,g,b) (0x00000000 | \
29  (((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8))
30 
31 
32  #define GINDIVIDUAL 0 /* Aspect Source Flag */
33  #define GBUNDLED 1
34 
35  #define GDI_VC_FRACTION 0
36  #define GDI_VC_MM 1
37  #define GDI_VC_PDC 2
38 
39  #define DM_CLEAR 0x0 /* d' = 0 */
40  #define DM_AND 0x1 /* d' = d AND s */
41  #define DM_NDAND 0x2 /* d' = s AND (NOT d) */
42  #define DM_REPLACE 0x3 /* d' = s */
43  #define DM_NSAND 0x4 /* d' = (NOT s) AND d */
44  #define DM_NOP 0x5 /* d' = d */
45  #define DM_XOR 0x6 /* d' = s XOR d */
46  #define DM_OR 0x7 /* d' = s OR d */
47  #define DM_NOR 0x8 /* d' = NOT (s OR d) */
48  #define DM_NXOR 0x9 /* d' = NOT (s XOR d) */
49  #define DM_FLIP 0xA /* d' = NOT d */
50  #define DM_NDOR 0xB /* d' = s OR (NOT d) */
51  #define DM_MIRROR 0xC /* d' = NOT s */
52  #define DM_NSOR 0xD /* d' = (NOT s) OR d */
53  #define DM_NAND 0xE /* d' = NOT (s AND d) */
54  #define DM_SET 0xF /* d' = 1 */
55  #define DM_BM1 0x10 /* d' = min(s,d) - blending method #1 */
56 
57  #define DM_ALPHA 0x11 /* alpha blending */
58 
59 /* nearest integer function */
60 #ifndef NINT
61 #define NINT(i) ( (long)(i + ((i < 0.)? -0.5: 0.5) ) )
62 #endif
63 #ifndef ININT
64 #define ININT(i) ( (int)(i + ((i < 0.)? -0.5: 0.5) ) )
65 #endif
66 
67 
68 #define GREGION_RECTANGLE 1
69 #define GREGION_ELLIPSE 2
70 #define GREGION_POLYGON 3
71 #define GREGION_POLYBEZIER 4
72 #define GREGION_POLYLINE 5 // not a registered WebCGM region type
73 
74 // Edge flags bits
75 #define PGS_VISIBLE 0x01
76 #define PGS_CLOSE 0x02
77 #define PGS_NEW_REGION 0x04
78 #define PGS_CONNECT 0x08
79 
80 #define PGS_IS_VISIBLE(k) (k & PGS_VISIBLE)
81 #define PGS_IS_CLOSE(k) (k & PGS_CLOSE)
82 
83 #define CGM_PI 3.14159265358979323846264338327950288
84 #define degree_to_radian(deg) (CGM_PI * deg / 180.0)
85 #define radian_to_degree(rad) (180.0 * rad / CGM_PI)
86 #define Cvt2PosAngle(a) while (a < 0) a += CGM_PI * 2;
87 
88 #define vectorLength(vec) ( sqrt(vec.x * vec.x + vec.y * vec.y) )
89 
90 #include "Utility/DPoint.h"
91 #include "Utility/LPoint.h"
92 #include "Utility/FPoint.h"
93 #include "Figure.h"
94 #include "Path.h"
95 #include "Clipping.h"
96 #include "TextExtent.h"
97 #include "CgmObjects.h"
98 #include "HatchStyles.h"
99 #include "Matrix.h"
100 #include "PolyPolylineData.h"
101 #include "InterpInteriorParams.h"
102 
103 
104 typedef void* CGMLIB2_HANDLE;
105 
106 namespace Larson {
107 
108 #define BwRasterCompressionNone 0
109 #define BwRasterCompressionGroup4 1
110 
111 #define ColorRasterCompressionNone 0
112 #define ColorRasterCompressionRLE 1
113 #define ColorRasterCompressionPNG 2
114 #define ColorRasterCompressionJPEG 3
115 
116 
118 // CCgmBaseObj - base class for all 'graphical elelments and attributtes'
119 
122 {
123 protected:
124  CCgmBaseObj() {};
125 
126 public:
127 
128 // Begin Enums
129 
130  enum Shape {
131  polyline = 0x00000000,
132  disjointPolyline = 0x00000001,
133  polyMarker = 0x00000002,
134  text = 0x00000004,
135  restrictedText = 0x00000008,
136  appendText = 0x00000010,
137  polygon = 0x00000020,
138  polygonSet = 0x00000040,
139  cellArray = 0x00000080,
140  rectangle = 0x00000100,
141  circle = 0x00000200,
142  arc3Pt = 0x00000400,
143  arc3PtClose = 0x00000800,
144  arcCenter = 0x00001000,
145  arcCenterClose = 0x00002000,
146  ellipse = 0x00004000,
147  ellipticalArc = 0x00008000,
148  ellipticalArcClose = 0x00010000,
149  arcCenterRev = 0x00020000,
150  nub = 0x00040000,
151  nurb = 0x00080000,
152  polybezier = 0x00100000,
153  tile = 0x00200000,
154  compoundLine = 0x00400000,
155  figure = 0x00800000,
156  trace = 0x01000000,
157  arrow = 0x02000000,
158  callout = 0x04000000,
159  hyperbolicArc = 0x08000000,
160  parabolicArc = 0x10000000,
161  copySegment = 0x20000000,
162  polySymbol = 0x40000000,
163  compoundText = 0x80000000,
164  gdp = 0x00000003,
165  message = 0x00000007,
166  applicationData = 0x0000000F
167  };
168 
169  enum CellPathDirection {
170  cellPathDir0 = 0,
171  cellPathDir90 = 1,
172  cellPathDir180 = 2,
173  cellPathDir270 = 3
174  };
175 
176  enum LineProgressionDirection {
177  lineProgressionDir90 = 0,
178  lineProgressionDir270 = 1
179  };
180 
181  enum InheritanceFlags {
182  inhFlagStateList = 0,
183  inhFlagAppStruct = 1
184  };
185 
186  enum CharSetType {
187  charSet94G = 0,
188  charSet96G = 1,
189  charSet94MultiByteG = 2,
190  charSet96MultiByteG = 3,
191  charSetComplete = 4
192  };
193 
194  enum LocationDataTypeSelector {
195  locDataTypeSelUI8 = 0,
196  locDataTypeSelUI16 = 1,
197  locDataTypeSelUI32 = 2
198  };
199 
200  enum ColourSelectionMode {
201  colourSelectIndexed = 0,
202  colourSelectDirect = 1
203  };
204 
205  enum SpecMode {
206  specModeAbsolute = 0,
207  specModeScaled = 1,
208  specModeFractional = 2,
209  specModeMM = 3
210  };
211 
212  enum DevViewportSpecMode {
213  devViewSpecFraction = 0,
214  devViewSpecMM = 1,
215  devViewSpecPhysical = 2
216  };
217 
218  enum DevViewportIsotropy {
219  devViewIsotropyNotForced = 0,
220  devViewIsotropyForced = 1
221  };
222 
223  enum DevViewportHorAlign {
224  devViewHorAlignLeft = 0,
225  devViewHorAlignCentre = 1,
226  devViewHorAlignRight = 2
227  };
228 
229  enum DevViewportVertAlign {
230  devViewVertAlignBottom = 0,
231  devViewVertAlignCentre = 1,
232  devViewVertAlignTop = 2
233  };
234 
235  enum TextPrecision {
236  textPrecString = 0,
237  textPrecChar = 1,
238  textPrecStroke = 2
239  };
240 
241  enum InteriorStyle {
242  interiorStyleHollow = 0,
243  interiorStyleSolid = 1,
244  interiorStylePattern = 2,
245  interiorStyleHatch = 3,
246  interiorStyleEmpty = 4,
247  interiorStyleGeoPatt = 5,
248  interiorStyleInterp = 6
249  };
250 
251  enum HatchIndex {
252  hatchIndexHorizontal = 1,
253  hatchIndexVertical = 2,
254  hatchIndexPosSlope = 3,
255  hatchIndexNegSlope = 4,
256  hatchIndexHorVertCross = 5,
257  hatchIndexPosNegCross = 6
258  };
259 
260  enum InterpolatedInteriorStyle {
261  interpolatedInteriorStyleParallel = 1,
262  interpolatedInteriorStyleElliptical = 2,
263  interpolatedInteriorStyleTriangular = 3
264  };
265 
266  enum LineType {
267  lineTypeNotVisible = 0,
268  lineTypeSolid = 1,
269  lineTypeDash = 2,
270  lineTypeDot = 3,
271  lineTypeDashDot = 4,
272  lineTypeDashDotDot = 5,
273  lineTypeArrowTail = 6, // extended line style - trailing arrow
274  lineTypeCircleHead = 7, // ditto - leading circle
275  lineTypeArrowHeadTail = 8, // ditto - leading and trailing arrow
276  lineTypeStyleStich = 9, // ditto - stitch
277  lineTypeStyleChain = 10, // ditto - chain
278  lineTypeStyleCenter = 11, // ditto - center
279  lineTypeStyleHidden = 12, // ditto - hidden
280  lineTypeStylePhantom = 13, // ditto - phantom
281  lineTypeStyleWavy = 14,
282  lineTypeStyleZBroke = 15
283  };
284 
285  enum HatchStyle {
286  hatchStyleParallel = 0,
287  hatchStyleCrossHatch = 1
288  };
289 
290  enum Transparency {
291  transparencyOff = 0,
292  transparencyOn = 1
293  };
294 
295  enum ClipIndicator {
296  clipIndicatorOff = 0,
297  clipIndicatorOn = 1
298  };
299 
300  enum ClippingMode {
301  clipModeLocus = 0,
302  clipModeShape = 1,
303  clipModeLocusThenShape = 2
304  };
305 
306  enum ProtectionRegionIndicator {
307  protRegionIndUnknown = 0,
308  protRegionIndOff = 1,
309  protRegionIndClip = 2,
310  protRegionIndShield = 3
311  };
312 
313  enum TextPathMode {
314  textPathModeOff = 0,
315  textPathModeNonTang = 1,
316  textPathModeAxisTang = 2
317  };
318 
319  enum TextFinalityFlag {
320  textFinalFalse = 0,
321  textFinalTrue = 1
322  };
323 
324  enum EdgeFlags {
325  edgeFlagInvisible = 0,
326  edgeFlagVisible = 1,
327  edgeFlagClose = 2,
328  edgeFlagVisibleClose = 3,
329  edgeFlagAttrChanged = 4
330  };
331 
332  enum CellRepresentationMode {
333  cellRepRunLength = 0,
334  cellRepPackedList = 1
335  };
336 
337  enum ArcClosureType {
338  arcCloseNone = -1,
339  arcClosePie = 0,
340  arcCloseChord = 1
341  };
342 
343  enum ContinuityIndicator {
344  contIndicatorDisc = 1,
345  contIndicatorCont = 2
346  };
347 
348  enum TileCompressionType {
349  tileCompressNullBack = 0,
350  tileCompressNullFore = 1,
351  tileCompressT6 = 2,
352  tileCompress1Dimensional = 3,
353  tileCompressT42Dimensional = 4,
354  tileCompressBitmap = 5,
355  tileCompressRunLength = 6,
356  tileCompressJPEG = 7,
357  tileCompressLZW = 8,
358  tileCompressPNG = 9
359  };
360 
361  enum MarkerType {
362  markerTypeDot = 1,
363  markerTypePlus = 2,
364  markerTypeAsterisk = 3,
365  markerTypeCircle = 4,
366  markerTypeCross = 5
367  };
368 
369  enum TextPath {
370  textPathRight = 0,
371  textPathLeft = 1,
372  textPathUp = 2,
373  textPathDown = 3
374  };
375 
376  enum TextAlignmentHorizontal {
377  textHorAlignNormal = 0,
378  textHorAlignLeft = 1,
379  textHorAlignCentre = 2,
380  textHorAlignRight = 3,
381  textHorAlignContHor = 4
382  };
383 
384  enum TextAlignmentVertical {
385  textVertAlignNormal = 0,
386  textVertAlignTop = 1,
387  textVertAlignCap = 2,
388  textVertAlignHalf = 3,
389  textVertAlignBase = 4,
390  textVertAlignBottom = 5,
391  textVertAlignContVert = 6
392  };
393 
394  enum EdgeVisibility {
395  edgeVisibleOff = 0,
396  edgeVisibleOn = 1
397  };
398 
399  enum AspectSourceFlags {
400  asfLineType = 0,
401  asfLineWidth = 1,
402  asfLineColour = 2,
403  asfMarkerType = 3,
404  asfMarkerSize = 4,
405  asfMarkerColour = 5,
406  asfTextFontIndex = 6,
407  asfTextPrecision = 7,
408  asfCharExpFactor = 8,
409  asfCharSpacing = 9,
410  asfTextColour = 10,
411  asfInteriorStyle = 11,
412  asfFillColour = 12,
413  asfHatchIndex = 13,
414  asfPatternIndex = 14,
415  asfEdgeType = 15,
416  asfEdgeWidth = 16,
417  asfEdgeColour = 17
418  };
419 
420  enum AspectSourceFlagValue {
421  asfValueIndividual = 0,
422  asfValueBundled = 1
423  };
424 
425  enum LineCapIndicator {
426  lineCapUnspecified = 1,
427  lineCapButt = 2,
428  lineCapRound = 3,
429  lineCapProjSquare = 4,
430  lineCapTriangle = 5
431  };
432 
433  enum DashCapIndicator {
434  dashCapUnspecified = 1,
435  dashCapButt = 2,
436  dashCapMatch = 3
437  };
438 
439  enum LineJoinIndicator {
440  lineJoinUnspecified = 1,
441  lineJoinMitre = 2,
442  lineJoinRound = 3,
443  lineJoinBevel = 4
444  };
445 
446  enum LineTypeContinuation {
447  lineContUnspecified = 1,
448  lineContContinue = 2,
449  lineContRestart = 3,
450  lineContAdaptiveCont = 4
451  };
452 
453  enum TextScoreType {
454  textScoreRight = 1,
455  textScoreLeft = 2,
456  textScoreThrough = 3,
457  textScoreKendot = 4
458  };
459 
460  enum TextScoreIndicator {
461  textScoreIndOff = 0,
462  textScoreIndOn = 1
463  };
464 
465  enum RestrTextType {
466  restrTextNone = 0,
467  restrTextBasic = 1,
468  restrTextBoxedCap = 2,
469  restrTextBoxedAll = 3,
470  restrTextIsotropicCap = 4,
471  restrTextIsotropicAll = 5,
472  restrTextJustified = 6
473  };
474 
475  enum SymbolSize {
476  symbolSizeHeight = 0,
477  symbolSizeWidth = 1,
478  symbolSizeBoth = 2
479  };
480 
481  enum MessageAction {
482  messageActionRequiredFalse = 0,
483  messageActionRequiredTrue = 1
484  };
485 
486  enum SegmentTransformationApplication {
487  segTransAppNo = 0,
488  segTransAppYes = 1
489  };
490 
491  enum InheritanceFilter {
492  inhFilterLineBundleIndex = 0,
493  inhFilterLineType = 1,
494  inhFilterLineWidth = 2,
495  inhFilterLineColour = 3,
496  inhFilterLineClippingMode = 4,
497  inhFilterMarkerBundleIndex = 5,
498  inhFilterMarkerType = 6,
499  inhFilterMarkerSize = 7,
500  inhFilterMarkerColour = 8,
501  inhFilterMarkerClippingMode = 9,
502  inhFilterTextBundleIndex = 10,
503  inhFilterTextFontIndex = 11,
504  inhFilterTextPrecision = 12,
505  inhFilterCharExpFactor = 13,
506  inhFilterCharSpacing = 14,
507  inhFilterTextColour = 15,
508  inhFilterCharHeight = 16,
509  inhFilterCharOrientation = 17,
510  inhFilterTextPath = 18,
511  inhFilterTextAlignment = 19,
512  inhFilterFillBundleIndex = 20,
513  inhFilterInteriorStyle = 21,
514  inhFilterFillColour = 22,
515  inhFilterHatchIndex = 23,
516  inhFilterPatternIndex = 24,
517  inhFilterEdgeBundleIndex = 25,
518  inhFilterEdgeType = 26,
519  inhFilterEdgeWidth = 27,
520  inhFilterEdgeColour = 28,
521  inhFilterEdgeVisibility = 29,
522  inhFilterEdgeClippingMode = 30,
523  inhFilterFillRefPoint = 31,
524  inhFilterPatternSize = 32,
525  inhFilterAuxColour = 33,
526  inhFilterTransparency = 34,
527  inhFilterLineAttributes = 35,
528  inhFilterMarkerAttributes = 36,
529  inhFilterTextPresAndPlaceAttr = 37,
530  inhFilterTextPlaceAndOrientAttr = 38,
531  inhFilterFillAttributes = 39,
532  inhFilterEdgeAttributes = 40,
533  inhFilterPatternAttr = 41,
534  inhFilterOutputControl = 42,
535  inhFilterPickIdentifier = 43,
536  inhFilterAllAttrAndControl = 44,
537  inhFilterAll = 45,
538  inhFilterLineTypeASF = 46,
539  inhFilterLineWidthASF = 47,
540  inhFilterLineColorASF = 48,
541  inhFilterMarkerTypeASF = 49,
542  inhFilterMarkerSizeASF = 50,
543  inhFilterMarkerColourASF = 51,
544  inhFilterTextFontIndexASF = 52,
545  inhFilterTextPrecisionASF = 53,
546  inhFilterCharExpFactorASF = 54,
547  inhFilterCharSpacingASF = 55,
548  inhFilterTextColourASF = 56,
549  inhFilterInteriorStyleASF = 57,
550  inhFilterFillColourASF = 58,
551  inhFilterHatchIndexASF = 59,
552  inhFilterPatternIndexASF = 60,
553  inhFilterEdgeTypeASF = 61,
554  inhFilterEdgeWidthASF = 62,
555  inhFilterEdgeColourASF = 63,
556  inhFilterLineASFs = 64,
557  inhFilterMarkerASFs = 65,
558  inhFilterTextASFs = 66,
559  inhFilterFillASFs = 67,
560  inhFilterEdgeASFs = 68,
561  inhFilterAllASFs = 69,
562  inhFilterMitreLimit = 70,
563  inhFilterLineCap = 71,
564  inhFilterLineJoin = 72,
565  inhFilterLineTypeCont = 73,
566  inhFilterLineTypeInitOffset = 74,
567  inhFilterTextScoreType = 75,
568  inhFilterRestrTextType = 76,
569  inhFilterInterpolatedInterior = 77,
570  inhFilterEdgeCap = 78,
571  inhFilterEdgeJoin = 79,
572  inhFilterEdgeTypeCont = 80,
573  inhFilterEdgeTypeInitOffset = 81,
574  inhFilterSymbolLibraryIndex = 82,
575  inhFilterSymbolColour = 83,
576  inhFilterSymbolSize = 84,
577  inhFilterSymbolOrientation = 85,
578  inhFilterSymbolAttr = 86
579  };
580 
581  enum InheritanceFilterSetting {
582  inhFilterSettingStateList = 0,
583  inhFilterSettingSegment = 1
584  };
585 
586  enum ClipInheritance {
587  clipInhStateList = 0,
588  clipInhIntersection = 1
589  };
590 
591  enum SegmentHighlighting {
592  segHighlightNormal = 0,
593  segHighlightHigh = 1
594  };
595 
596  enum PolygonType {
597  polygonTypeNotAPolygon = 0,
598  polygonTypeComplex = 1,
599  polygonTypeConvex = 2,
600  polygonTypeNonconvex = 3
601  };
602 
603 
604 // End Enums
605 
607  CCgmBaseObj(CCgmObjects* pOwner, enum Shape nShape);
608 
610  virtual ~CCgmBaseObj();
611 
613  void CopyBase(CCgmBaseObj* p);
614 
615 // Operations
616 
618  virtual PolyPolylineData* ConvertToPoints(double step = 0);
620  virtual CCgmBaseObj* Clone();
622  virtual void Draw(CDrawBase* pDB);
624  virtual void Restore(CCgmBaseObj* pObj);
626  virtual bool IsFill();
628  virtual bool IsClosed();
630  virtual bool IsText();
632  DRect GetBounds(bool locus = false);
634  virtual long GetHandleCount();
636  virtual DPoint GetHandle(long nHandle, int*pType,double handleOffset = 0);
638  virtual void MoveEditHandle(long nHandle, bool bAspect, DPoint point);
640  virtual bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
642  virtual void ReCalcBounds();
644  virtual void TransformBy(CMatrix* pXForm);
646  virtual void ConvertColors(int monoEnhance, int colorConvert);
647 
648  const CCgmBaseObj& operator=( const CCgmBaseObj& a );
649 
650 // Implementation
651 public:
653  DRect BoundsFromPts(DPoint *pts, long nPts);
655  void DrawPath(CDrawBase *pDB, Path* path, bool fill);
657  virtual long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression = BwRasterCompressionNone,
658  int colorCompression = ColorRasterCompressionNone, bool unicode = false, bool bRGBa = false, int vdcPrecision = 0);
660  virtual bool IsRaster();
662  void RotatePts(DPoint center, double angle, DPoint *points, long nPoints);
664  DRect GetClipRect();
665 
667  DRect m_bounds;
669  CColor m_auxColor;
671  CColor m_fillColor;
673  CColor m_lineColor;
675  unsigned char m_transparency;
677  unsigned char m_lineCap;
679  unsigned char m_lineDashCap;
681  unsigned char m_lineJoin;
683  unsigned char m_lineWidthSpecMode;
685  unsigned char m_fillInteriorStyle;
687  unsigned char m_interiorStyleSpecMode;
693  short m_lineType;
709  enum Shape m_nShape;
714 
716  double m_lineWidth;
717 
718  DPoint m_patternHeight; // valid when
719  DPoint m_patternWidth; // pattern fill
720  DPoint m_patternRefPoint; // with pattern
721 
722  // implementation data
723 protected:
724 #ifndef CGMOBJECTS_NO_SAVE
725  long SaveLineAttr(CGMLIB2_HANDLE hCGMLIB2);
728  long SaveFillAttr(CGMLIB2_HANDLE hCGMLIB2);
730  long SaveClipping(CGMLIB2_HANDLE hCGMLIB2);
731 #endif
732  DRect IntersectClip(DRect rect);
734 
735 public:
736  static DPoint* beziertoPts(DPoint& p0, DPoint& p1, DPoint& p2, DPoint& p3, double step, long* nPts);
737  double DefaultStep();
738  static PolyPolylineData* PolyBezierToPoints(long type, DPoint* pPts, long count, double step,
739  DRect* pRect = NULL, DRect* pBounds = NULL);
740  void dbgShapeInfo(int i, std::wstring *pID);
741  DPoint *arcToBeziers(DPoint center, double radius, double a1, double a2, long *cnt);
742  void arcSmallToBeziers(double radius, double a1, double a2, DPoint *polyBez);
743  char polygonType(DPoint *pts, long count);
744  wchar_t map2unichar(wchar_t wcin);
745 };
746 
748 
749 class CCgmPoly;
751 class CCgmRect : public CCgmBaseObj
752 {
753 protected:
754  CCgmRect() {};
755 
756 public:
757  CCgmRect(CCgmObjects* pParent, enum Shape nShape = rectangle);
758  virtual ~CCgmRect();
759 
760 // Implementation
761 public:
762  void ReCalcBounds();
763 #ifndef CGMOBJECTS_NO_SAVE
764  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
765 #endif
766  bool IsFill();
767  virtual CCgmBaseObj* Clone();
768  void Draw(CDrawBase *pDB);
769  PolyPolylineData* ConvertToPoints(double step = 1);
770  void MoveEditHandle(long nHandle, bool bAspect, DPoint point);
771  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
772  void Restore(CCgmBaseObj* pObj) { *this = *((CCgmRect*)pObj); };
773  void SetPts(DPoint ll, DPoint ur);
774  void TransformBy(CMatrix* pXForm);
775 
776 private:
777  DPoint m_Pts[2];
778 
780  DPoint m_altPts[2];
781 
782 public:
783  DPoint Pt(int i) { DPoint d = m_Pts[i]; return d; };
784  DPoint altPt(int i) { DPoint d = m_altPts[i]; return d; };
785 
786  const CCgmRect& operator=( const CCgmRect& a );
787 
788 protected:
789 };
790 
792 
794 class CCgmText : public CCgmBaseObj
795 {
796 protected:
797  CCgmText() {};
798 
799 public:
800  CCgmText(CCgmObjects* pParent, enum Shape nShape);
801  virtual ~CCgmText();
802 
803 // Implementation
804 public:
805  void AddPath(Path *path);
806  void CalcTotalExtent(CCgmText *pCgmText, CTextExtent& total_te, double rotation = 0);
807  void CalcExtent();
808  virtual CCgmBaseObj* Clone();
809  virtual PolyPolylineData* ConvertToPoints(double step = 1);
810  virtual void Draw(CDrawBase *pDB);
811  DPoint GetHandle(long nHandle, int* pType, double handleOffset = 0);
812  long GetHandleCount() { return 8; };
813  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
814  CCgmText* HitTestFragment(DPoint point);
815  virtual bool IsText();
816  virtual void ReCalcBounds();
817  virtual void Restore(CCgmBaseObj* pObj) { *this = *((CCgmText*)pObj);};
818 #ifndef CGMOBJECTS_NO_SAVE
819  virtual long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
820 #endif
821  DPoint StartPos(DPoint* bounds);
822  virtual void TransformBy(CMatrix* pXForm);
823  const CCgmText& operator=( const CCgmText& a );
824 
825 
826  double m_characterExpFactor;
827 
829  struct {
830  DPoint up;
831  DPoint base;
833 
835 
837 
839 
840  std::wstring m_text;
841 
843 
844  struct {
845  float hor, ver;
847 
848  CCgmText* m_pAppendParent;
849 
851 
853 
854  struct {
855  unsigned char hor, ver;
856  } m_textAlignment;
857 
859  unsigned char m_final;
860 
861  unsigned char m_textPath;
862 
863  unsigned char m_textPrecision;
864 
865  unsigned char m_restrictedTextType;
866 
868 
869  unsigned char m_characterSetIndex;
870 
871  unsigned char m_altCharacterSetIndex;
872 
873 protected:
874 #ifndef CGMOBJECTS_NO_SAVE
875  long SaveFirstText(CGMLIB2_HANDLE hCGMLIB2, CCgmText* pFirst, bool unicode);
876 #endif
877 
878 };
879 
881 
883 class CCgmPoly : public CCgmBaseObj
884 {
885 protected:
886  CCgmPoly() {};
887 
888 public:
889  CCgmPoly(CCgmObjects* pParent, enum Shape nShape = polyline);
890  virtual ~CCgmPoly();
891 
892 // Operations
893  const CCgmPoly& operator=( const CCgmPoly& a );
894 
895 // Implementation
896 public:
898  DPoint* m_pts;
900  long m_nPts;
902  unsigned char* m_edges;
906  long GetNumberPolygons();
907 
909  void AddPoint(DPoint point, long index);
910  virtual CCgmBaseObj* Clone();
911  PolyPolylineData* ConvertToPoints(double step = 0);
913  void DeletePoint(long index);
914  virtual void Draw(CDrawBase *pDB);
915  DPoint GetHandle(long nHandle, int*pType,double handleOffset = 0);
916  long GetHandleCount();
917  bool IsFill();
918  void MoveEditHandle(long nHandle, bool bAspect, DPoint point);
919  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
920  void ReCalcBounds();
921  void Restore(CCgmBaseObj* pObj);
922 #ifndef CGMOBJECTS_NO_SAVE
923  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
924 #endif
925  void TransformBy(CMatrix* pXForm);
926 
927 protected:
928 };
930 class CCgmTileArray;
931 
934 {
935 protected:
936  CCgmCellArray() {};
937 
938 public:
939  virtual ~CCgmCellArray();
940  CCgmCellArray(CCgmObjects* pParent, enum Shape nShape);
941 
942 // Implementation
943 public:
944  virtual CCgmBaseObj* Clone();
945  PolyPolylineData* ConvertToPoints(double step = 1);
946  CCgmTileArray* ConvertTo1BPPTileArray();
947  void ConvertColors(int monoEnhance, int colorConvert);
948  void Draw(CDrawBase *pDB);
949  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
950  bool IsRaster();
951  bool IsSkewed();
952  void ReCalcBounds();
953  void Restore(CCgmBaseObj* pObj);
954 #ifndef CGMOBJECTS_NO_SAVE
955  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision = false);
956 #endif
957  void TransformBy(CMatrix* pXForm);
958  int LengthCellColors();
959  int GetBytesPerLine();
960  bool Compress(unsigned char* pRaw);
961  unsigned char* UnCompress();
962 
963  const CCgmCellArray& operator=( const CCgmCellArray& a );
964 
966 
970  unsigned char* m_cellColors;
976  struct {
977  long nx, ny;
978  } m_nCells;
980  DPoint m_Pts[3];
989  unsigned char m_monoChromatic;
990 };
991 
993 
996 {
997 protected:
998  CCgmTileArray() {};
999 
1000 public:
1001 
1003  CCgmTileArray(CCgmObjects* pParent, enum Shape nShape);
1005  virtual ~CCgmTileArray();
1006  const CCgmTileArray& operator=( const CCgmTileArray& a );
1007 
1008  virtual CCgmBaseObj* Clone();
1009  void ConvertColors(int monoEnhance, int colorConvert);
1010  void Draw(CDrawBase *pDB);
1011  int GetBytesPerLine(int nTile);
1012  DPoint* GetPQRPts();
1013  void GetXForm(double m[2][2]);
1014  bool IsRaster();
1015  void ReCalcBounds();
1016  void Restore(CCgmBaseObj* pObj);
1017  void TransformBy(CMatrix* pXForm);
1018 #ifndef CGMOBJECTS_NO_SAVE
1019  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision = false);
1020 #endif
1021 
1026 
1028 
1035  typedef struct {
1037  unsigned char* colors;
1038  long nCellsPerLine;
1039  long nLines;
1040  TileCompressionType compressionType;
1046  CColor biFgc;
1048  CColor biBgc;
1051  long biTonal;
1052  } tiles;
1053  tiles* m_tiles;
1054 
1057  struct {
1058  long path;
1059  long line;
1060  } m_nTiles;
1061 
1064  struct {
1065  long path;
1066  long line;
1067  } m_nCells;
1068 
1071  struct {
1072  double path;
1073  double line;
1074  } m_cellSize;
1075 
1076  struct {
1077  long path;
1078  long line;
1079  } m_imageOffset;
1080 
1083  struct {
1084  long path;
1085  long line;
1086  } m_imageCells;
1087 
1093  DPoint m_Pt;
1094 
1095  // set tile array paramters
1096  int SetTileArray(int cellPathDir, int lineProgressionDir, int pathCellsPerTile, int lineCellsPerTile,
1097  double pathCellSize, double lineCellSize, int pathCellsImage, int lineCellsImage,
1098  int pathNumberOfTiles, int lineNumberOfTiles);
1099 
1100  // set single tile cell data
1101  int SetTileCells(int pathTileNumber, int lineTileNumber, unsigned char* pData, int dataSize);
1102 
1103 protected:
1104  CCgmCellArray* m_pCellDraw;
1105 };
1106 
1108 
1110 class CCgmFigure : public CCgmBaseObj
1111 {
1112 protected:
1113  CCgmFigure() {};
1114 
1115 public:
1116  CCgmFigure(CCgmObjects* pParent, enum Shape nShape);
1117  virtual ~CCgmFigure();
1118 
1119 // Operations
1120  void AddPath(CFigure::figureData *figure);
1121 
1122 // Implementation
1123 public:
1124  CFigure::figureData *m_figureData;
1126  long m_nPaths;
1127 
1128 #ifndef CGMOBJECTS_NO_SAVE
1129  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
1130 #endif
1131  bool IsFill();
1132  virtual CCgmBaseObj* Clone();
1134  virtual PolyPolylineData* ConvertToPoints(double step = 0);
1136  virtual PolyPolylineData* ConvertToPoints(double step, DRect* pRect);
1137  void Draw(CDrawBase *pDB);
1138  void Restore(CCgmBaseObj* pObj);
1139  void TransformBy(CMatrix* pXForm);
1140  const CCgmFigure& operator=( const CCgmFigure& a );
1141 
1142 protected:
1143 };
1144 
1146 
1148 class CCgmTrace : public CCgmBaseObj
1149 {
1150 protected:
1151  CCgmTrace() { };
1152 
1153 public:
1154  CCgmTrace(CCgmObjects* pParent, enum Shape nShape);
1155  virtual ~CCgmTrace();
1156 
1157 // Implementation
1158 public:
1159  virtual CCgmBaseObj* Clone();
1160  void Draw(CDrawBase *pDB);
1161 #ifndef CGMOBJECTS_NO_SAVE
1162  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
1163 #endif
1164  void ReCalcBounds();
1165  void Restore(CCgmBaseObj* pObj);
1166  void TransformBy(CMatrix* pXForm);
1167 
1168  CCgmTrace *m_pPrevTrace;
1169  CCgmTrace *m_pNextTrace;
1170 
1171  long m_group_identifier;
1173  DPoint m_start;
1174  float m_sample_normalization_extent;
1175  float m[2][2];
1176  struct {
1177  long n;
1178  float *list;
1179  } m_samples;
1180  struct {
1181  long n, type;
1182  unsigned long *list;
1183  } m_VA_fill_colors;
1184  struct {
1185  long n, type;
1186  unsigned long *list;
1187  } m_background_fill_colors;
1188 
1189  char m_positive_lobe_display_priority,
1190  m_negative_lobe_display_priority,
1191  m_positive_lobe_pixel_drawing_mode,
1192  m_negative_lobe_pixel_drawing_mode;
1193  float m_data_complete_coordinate;
1194  long m_data_complete_flag;
1195  long m_rendering_direction;
1196 
1197  // Trace Attributes
1198  FPoint m_orientation_baseline,
1199  m_orientation_amplitude;
1200  float m_baseline_scale,
1201  m_amplitude_scale;
1202  char m_display_mode_wiggle,
1203  m_display_mode_positive_va_fill,
1204  m_display_mode_negative_va_fill,
1205  m_display_mode_background_fill;
1206  long m_maximum_number_of_samples;
1207  struct {
1208  float pos, neg;
1209  } m_wiggle_amplitude_limit;
1210  struct {
1211  float min, max;
1212  } m_positive_va_fill_boundaries;
1213  struct {
1214  float min, max;
1215  } m_negative_va_fill_boundaries;
1216  char m_rectified_va_fill_mode;
1217  char m_va_fill_style;
1218  struct {
1219  CColor pos, neg;
1220  } m_va_fill_constant_colour;
1221  struct {
1222  long pos, neg;
1223  } m_va_fill_constant_pattern;
1224  char m_va_fill_alignment,
1225  m_va_fill_var_colour_selection;
1226  struct {
1227  float factor, bias;
1228  long min, max;
1229  } m_va_fill_var_linear;
1230  struct {
1231  float pos, neg;
1232  } m_background_fill_boundaries;
1233  char m_background_colour_interpolation_mode;
1234  char m_background_fill_style;
1235  struct {
1236  char indicator;
1237  unsigned long index;
1238  CColor colour;
1239  } m_background_null_colour;
1240  CColor m_background_fill_constant_colour;
1241  char m_background_fill_alignment;
1242  char m_background_fill_var_colour_selection;
1243  struct {
1244  float factor, bias;
1245  long min, max;
1246  } m_background_fill_var_linear;
1247 
1248  CColorReps *m_pColorReps;
1249 
1250  const CCgmTrace& operator=( const CCgmTrace& a );
1251 
1252 private:
1253 };
1254 
1256 
1258 class CCgmCircle : public CCgmBaseObj
1259 {
1260 protected:
1261  CCgmCircle() {};
1262 
1263 public:
1264  CCgmCircle(CCgmObjects* pParent, enum Shape nShape = circle);
1265  virtual ~CCgmCircle();
1266 
1267 // Implementation
1268 public:
1269 #ifndef CGMOBJECTS_NO_SAVE
1270  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
1271 #endif
1272  bool IsFill();
1273  virtual CCgmBaseObj* Clone();
1274  PolyPolylineData* ConvertToPoints(double step = 0);
1275  PolyPolylineData* ConvertToPoints(double step, bool bBezierPts);
1276  void Draw(CDrawBase *pDB);
1277  DPoint GetHandle(long nHandle, int*pType,double handleOffset = 0);
1278  long GetHandleCount();
1279  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
1280  void MoveEditHandle(long nHandle, bool bAspect, DPoint point);
1281  void Restore(CCgmBaseObj* pObj) { *this = *((CCgmCircle*)pObj); };
1282  void TransformBy(CMatrix* pXForm);
1283  DPoint ArcCenter();
1284  DPoint ArcStartPt();
1285  DPoint ArcEndPt();
1286  DPoint ArcMidPt();
1287  bool IsCoLinear();
1288  const CCgmCircle& operator=( const CCgmCircle& a );
1289 
1293  DPoint m_start;
1295  DPoint m_end;
1297  double m_radius;
1300 
1301 protected:
1302  bool IsPerpendicular(DPoint &pt1, DPoint &pt2, DPoint &pt3);
1303  DPoint Arc3PtCalcCenter(DPoint &pt1, DPoint &pt2, DPoint &pt3);
1304 };
1305 
1307 
1309 class CCgmEllipse : public CCgmBaseObj
1310 {
1311 protected:
1312  CCgmEllipse() {};
1313 
1314 public:
1315  CCgmEllipse(CCgmObjects* pParent, enum Shape nShape);
1316  CCgmEllipse(CCgmObjects* pParent, CCgmCircle* pCircle);
1317  virtual ~CCgmEllipse();
1318 
1319 #ifndef CGMOBJECTS_NO_SAVE
1320  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
1321 #endif
1322  bool IsFill();
1323  virtual CCgmBaseObj* Clone();
1324  PolyPolylineData* ConvertToPoints(double step = 0);
1325  PolyPolylineData* ConvertToPoints(double step, bool bBezierPts);
1326  CCgmPoly* ConvertToPolyBezier();
1327  void MakeBezierFromArc(double CenterX, double CenterY, double RadiusX,
1328  double RadiusY, double StartAngle, double SweepRange, bool UseMoveTo, CCgmPoly *pPoly);
1329  void Draw(CDrawBase *pDB);
1330  DPoint GetHandle(long nHandle, int*pType,double handleOffset = 0);
1331  long GetHandleCount();
1332  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
1333  void MoveEditHandle(long nHandle, bool bAspect, DPoint point);
1334  void Restore(CCgmBaseObj* pObj) { *this = *((CCgmEllipse*)pObj); };
1335  void TransformBy(CMatrix* pXForm);
1336  DPoint ArcStartPt();
1337  DPoint ArcEndPt();
1338  DPoint ArcMidPt();
1339  const CCgmEllipse& operator=( const CCgmEllipse& a );
1340 
1342  DPoint m_center;
1344  DPoint m_cdp1;
1346  DPoint m_cdp2;
1348  DPoint m_start;
1350  DPoint m_end;
1353 
1354 private:
1355  DPoint SinglePoint(DPoint vector);
1356 
1357 };
1358 
1360 
1363 {
1364 protected:
1365  CCgmHyperbolicArc() {};
1366 
1367 public:
1368  CCgmHyperbolicArc(CCgmObjects* pParent, enum Shape nShape);
1369 
1370  virtual ~CCgmHyperbolicArc();
1371 
1372 // Implementation
1373 public:
1374  DPoint m_center;
1377  DPoint m_start;
1378  DPoint m_end;
1379 
1380 #ifndef CGMOBJECTS_NO_SAVE
1381  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
1382 #endif
1383  virtual CCgmBaseObj* Clone();
1384  PolyPolylineData* ConvertToPoints(double step = 0);
1385  void Draw(CDrawBase *pDB);
1386  DPoint GetHandle(long nHandle, int*pType,double handleOffset = 0);
1387  long GetHandleCount();
1388  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
1389  void MoveEditHandle(long nHandle, bool bAspect, DPoint point);
1390  void Restore(CCgmBaseObj* pObj) { *this = *((CCgmHyperbolicArc*)pObj); };
1391  void TransformBy(CMatrix* pXForm);
1392  const CCgmHyperbolicArc& operator=( const CCgmHyperbolicArc& a );
1393 
1394 private:
1395  DPoint SinglePoint(DPoint vector);
1396 
1397 };
1398 
1400 
1403 {
1404 protected:
1405  CCgmParabolicArc() {};
1406 
1407 public:
1408  CCgmParabolicArc(CCgmObjects* pParent, enum Shape nShape);
1409 
1410  virtual ~CCgmParabolicArc();
1411 
1412 // Implementation
1413 public:
1414  DPoint m_tg_intersection_pt;
1415  DPoint m_start_pt;
1416  DPoint m_end_pt;
1417 
1418 #ifndef CGMOBJECTS_NO_SAVE
1419  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
1420 #endif
1421  virtual CCgmBaseObj* Clone();
1422  PolyPolylineData* ConvertToPoints(double step = 0);
1423  void Draw(CDrawBase *pDB);
1424  DPoint GetHandle(long nHandle, int*pType,double handleOffset = 0);
1425  long GetHandleCount();
1426  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
1427  void MoveEditHandle(long nHandle, bool bAspect, DPoint point);
1428  void Restore(CCgmBaseObj* pObj) { *this = *((CCgmParabolicArc*)pObj); };
1429  void TransformBy(CMatrix* pXForm);
1430  const CCgmParabolicArc& operator=( const CCgmParabolicArc& a );
1431 
1432 private:
1433  DPoint SinglePoint(DPoint vector);
1434 
1435 };
1436 
1438 
1440 class CCgmNurb : public CCgmBaseObj
1441 {
1442 protected:
1443  CCgmNurb() {};
1444 
1445 public:
1446  CCgmNurb(CCgmObjects* pParent, enum Shape nShape);
1447  virtual ~CCgmNurb();
1448 
1449  long m_order;
1451  DPoint* m_points;
1452  double* m_knots;
1453  double m_startValue;
1454  double m_endValue;
1455  long m_nWeights;
1456  double* m_weights;
1457 
1458 // Implementation
1459 public:
1460 #ifndef CGMOBJECTS_NO_SAVE
1461  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
1462 #endif
1463  bool IsFill();
1464  virtual CCgmBaseObj* Clone();
1465  PolyPolylineData* ConvertToPoints(double step = 0);
1466  void Draw(CDrawBase *pDB);
1467  DPoint GetHandle(long nHandle, int*pType,double handleOffset = 0);
1468  long GetHandleCount();
1469  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
1470  void Restore(CCgmBaseObj* pObj);
1471  void TransformBy(CMatrix* pXForm);
1472 
1473  const CCgmNurb& operator=( const CCgmNurb& a );
1474 
1475 protected:
1476 };
1477 
1479 
1481 class CCgmArrow : public CCgmPoly
1482 {
1483 protected:
1484  CCgmArrow() {};
1485 
1486 public:
1487  enum ArrowheadType {
1488  arrowheadNone = 0,
1489  arrowheadStick = 1,
1490  arrowheadFilled = 2,
1491  arrowheadCircle = 3,
1492  arrowheadDiamond = 4
1493  };
1494 
1495  CCgmArrow(CCgmObjects* pParent, enum Shape nShape = arrow);
1496 
1497  virtual CCgmBaseObj* Clone();
1498  void Draw(CDrawBase *pDB);
1499  void ReCalcBounds();
1500  void Restore(CCgmBaseObj* pObj);
1501 #ifndef CGMOBJECTS_NO_SAVE
1502  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
1503 #endif
1504  const CCgmArrow& operator=( const CCgmArrow& a );
1505 
1507  ArrowheadType m_beginType;
1509  ArrowheadType m_endType;
1510 
1513  float m_beginArrowheadHeight;
1514 
1517  float m_endArrowheadHeight;
1518 
1520  char m_halo;
1522  float m_haloSize;
1523 
1524 protected:
1525  CCgmBaseObj* MakeArrowheadObj(ArrowheadType arrowType, float arrowheadWidth, float arrowheadHeight, DPoint start, DPoint end, DPoint* pOffset);
1526 };
1527 
1529 
1531 class CCgmCallout : public CCgmText
1532 {
1533 protected:
1534  CCgmCallout() {};
1535 
1536 public:
1537  enum OutlineType {
1538  noOutline = 0,
1539  circle = 1,
1540  rectangle = 2
1541  };
1543  none = 0,
1544  line = 1,
1545  dogleg = 2
1546  };
1547 
1548  CCgmCallout(CCgmObjects* pParent, enum Shape nShape = callout);
1549 
1550  virtual CCgmBaseObj* Clone();
1551  PolyPolylineData* ConvertToPoints(double step);
1552  void Draw(CDrawBase *pDB);
1553  long GetHandleCount();
1554  DPoint GetHandle(long nHandle, int*pType,double handleOffset = 0);
1555  bool HitTest(DPoint point, double margin, int* pSegIndex = NULL);
1556  void MoveEditHandle(long nHandle, bool bAspect, DPoint point);
1557  void ReCalcBounds();
1558  void Restore(CCgmBaseObj* pObj);
1559 #ifndef CGMOBJECTS_NO_SAVE
1560  long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision);
1561 #endif
1562  void TransformBy(CMatrix* pXForm);
1563 
1564 
1565  OutlineType m_outline;
1567  DPoint m_anchor;
1568  DPoint m_dogleg;
1569  DPoint m_center;
1570  CCgmArrow::ArrowheadType m_arrowheadType;
1573  float m_gap;
1574  char m_halo;
1575  float m_haloSize;
1576 
1577 // Operations
1578  const CCgmCallout& operator=( const CCgmCallout& a );
1579 
1580 protected:
1581  CCgmBaseObj* MakeOutlineObj();
1582  CCgmBaseObj* MakeOutlineHaloObj();
1583  CCgmArrow* MakeConnectLineObj();
1584  DPoint ConnectPt();
1585  DPoint* TextPoints(int baseCap = 0);
1586 };
1587 
1588 
1591 {
1592 protected:
1593  CCgmCopySegment() {};
1594 
1595 public:
1596  CCgmCopySegment(CCgmObjects* pParent, enum Shape nShape = copySegment);
1597  virtual ~CCgmCopySegment();
1598 
1599  // Implementation
1600 public:
1602  DRect GetBounds(bool locus = false);
1604  void Draw(CDrawBase *pDB);
1605 
1607  long m_name;
1611  // otherwise it is not applied
1613 };
1614 
1616 class CCgmGdp : public CCgmBaseObj
1617 {
1618 protected:
1619  CCgmGdp()
1620  {
1621  m_pts = NULL;
1622  m_id = m_nPts = 0;
1623  };
1624 
1625 public:
1626  CCgmGdp(CCgmObjects* pParent, enum Shape nShape = gdp);
1627  virtual ~CCgmGdp()
1628  {
1629  if (m_pts)
1630  delete[] m_pts;
1631  };
1632 
1633  // Implementation
1634 public:
1635  int m_id;
1636  DPoint *m_pts;
1637  long m_nPts;
1638 };
1639 
1642 {
1643 protected:
1644  CCgmPolySymbol() {};
1645 
1646 public:
1647  CCgmPolySymbol(CCgmObjects* pParent, enum Shape nShape = polySymbol);
1648  virtual ~CCgmPolySymbol();
1649 
1650 // Operations
1651  const CCgmPolySymbol& operator=( const CCgmPoly& a );
1652 
1653 // Implementation
1654 public:
1656  DPoint* m_pts;
1658  long m_nPts;
1659 
1660  long m_libraryIndex;
1661  DPoint m_orientation[2];
1662  long m_sizeIndicator;
1663  double m_size[2];
1664 
1666  void AddPoint(DPoint point, long index);
1667  virtual CCgmBaseObj* Clone();
1669  void DeletePoint(long index);
1670  void Draw(CDrawBase *pDB);
1671 };
1672 
1674 class CCgmMessage : public CCgmBaseObj
1675 {
1676 protected:
1677  CCgmMessage() {};
1678 
1679 public:
1680  CCgmMessage(CCgmObjects* pParent, enum Shape nShape = message);
1681  virtual ~CCgmMessage() {};
1682 
1683  // Implementation
1684 public:
1685 
1688  int m_action;
1689  std::wstring m_text;
1690 };
1691 
1692 }; // end namespace Larson
1693 
1694 #endif // __DRAWOBJ_H__
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:6158
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:6891
PolyPolylineData * ConvertToPoints(double step=1)
convert this element to list of points
Definition: CgmObj.cpp:1088
unsigned char m_transparency
Transparency.
Definition: CgmObj.h:675
DPoint * arcToBeziers(DPoint center, double radius, double a1, double a2, long *cnt)
Definition: CgmObj.cpp:9531
ClipRectangle – Clipping rectangle data container class.
Definition: Clipping.h:44
unsigned char m_monoChromatic
Definition: CgmObj.h:989
long precision
color precision, 1 or 32
Definition: CgmObj.h:1042
unsigned char m_restrictedTextType
text precision
Definition: CgmObj.h:865
virtual DPoint GetHandle(long nHandle, int *pType, double handleOffset=0)
return position of specified edit handle
Definition: CgmObj.cpp:282
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:1711
double m_endValue
parameter start value
Definition: CgmObj.h:1454
long GetHandleCount()
return number of edit handles
Definition: CgmObj.cpp:5841
ClippingPath – ClippingPath data container class.
Definition: Clipping.h:19
virtual void ReCalcBounds()
recalculates bounds of this element, e.g. after geometry is modified
Definition: CgmObj.cpp:619
virtual void MoveEditHandle(long nHandle, bool bAspect, DPoint point)
move position of specified edit handle
Definition: CgmObj.cpp:425
CCgmCircle – Circle and CircularArc elements container class.
Definition: CgmObj.h:1258
void MoveEditHandle(long nHandle, bool bAspect, DPoint point)
move position of specified edit handle
Definition: CgmObj.cpp:5889
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:4146
CColor m_lineColor
line color, for filled element e.g. rectangle this is edge color
Definition: CgmObj.h:673
long m_nPaths
number of paths (one for each path element inside begin and end figure or compound-line) ...
Definition: CgmObj.h:1126
DPoint m_centerOrInter
centre, if 3 POINT arc this is intermediate point if 3 POINT arc
Definition: CgmObj.h:1291
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:3756
PolyPolylineData * ConvertToPoints(double step)
convert this element to list of points
Definition: CgmObj.cpp:8850
CColor biFgc
foreground color, when precision == 1 then this color is assigned to color specifiers with value == 1...
Definition: CgmObj.h:1046
double * m_knots
control points
Definition: CgmObj.h:1452
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:4663
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:3989
ArrowheadType m_endType
Ending Arrowhead Type, 0 = none.
Definition: CgmObj.h:1509
DPoint GetHandle(long nHandle, int *pType, double handleOffset=0)
return position of specified edit handle
Definition: CgmObj.cpp:5811
int compressedLength
if precision == 32 and this is >0 this lenght of RLE compressed
Definition: CgmObj.h:1044
PolyPolylineData * ConvertToPoints(double step=0)
convert this element to list of points
Definition: CgmObj.cpp:5556
DRect GetClipRect()
get the clip rectangle of this element
Definition: CgmObj.cpp:269
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision=false)
save this element to CGM file
Definition: CgmObj.cpp:3550
DPoint m_tv_radius_end
centre point
Definition: CgmObj.h:1375
unsigned char m_interiorStyleSpecMode
interior style specfication mode
Definition: CgmObj.h:687
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
end point
Definition: CgmObj.cpp:6039
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:9773
CCgmCallout – Callout element container class, note- not a standard ISO CGM element.
Definition: CgmObj.h:1531
virtual void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.cpp:523
void MoveEditHandle(long nHandle, bool bAspect, DPoint point)
move position of specified edit handle
Definition: CgmObj.cpp:9245
float m_haloSize
add line halo 0= off, 1= on
Definition: CgmObj.h:1575
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:4387
CColor biBgc
background color; if precision == 1 then this color is assigned to color specifiers with value == 0 ...
Definition: CgmObj.h:1048
DRect m_bounds
retains element vdc bounds (now includes shape: line width for lines, marker size for markers...
Definition: CgmObj.h:667
CCgmHyperbolicArc – HyperbolicArc element container class.
Definition: CgmObj.h:1362
long m_precision
cell color precision, 1 or 32
Definition: CgmObj.h:982
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.h:1334
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:8935
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:9784
long m_nPts
number of point in point list
Definition: CgmObj.h:900
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:3394
double m_radius
radius unless this 3 POINT arc this is end point
Definition: CgmObj.h:1297
CCgmObjects * m_pOwner
pointer to owner of this element
Definition: CgmObj.h:711
virtual PolyPolylineData * ConvertToPoints(double step=1)
convert this element to list of points
Definition: CgmObj.cpp:2497
double m_characterSpacing
character up and base orientation vector
Definition: CgmObj.h:834
DRect GetBounds(bool locus=false)
Get Segment bounds.
DPoint * m_pts
poly point list
Definition: CgmObj.h:898
CMatrix m_transform
transform applied when copied
Definition: CgmObj.h:1609
bool IsFill()
true if this is a filled graphical element
Definition: CgmObj.cpp:1187
virtual ~CCgmBaseObj()
Destructor.
Definition: CgmObj.cpp:122
virtual bool IsText()
true if this is text element
Definition: CgmObj.cpp:420
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:2596
short m_lineType
line type
Definition: CgmObj.h:693
char m_lineTypeCont
line type continuation
Definition: CgmObj.h:689
virtual bool IsClosed()
true if this is a closed graphical element
Definition: CgmObj.cpp:390
DPoint GetHandle(long nHandle, int *pType, double handleOffset=0)
return position of specified edit handle
Definition: CgmObj.cpp:6053
short m_ataLayerNumber
ATA Layer Number.
Definition: CgmObj.h:695
DPoint * m_pts
point list
Definition: CgmObj.h:1656
PolyPolylineData * ConvertToPoints(double step=1)
convert this element to list of points
Definition: CgmObj.cpp:3363
CInterpInteriorParams * m_interpInterior
pointer to interploated interior parameters, NULL if interiorStyle != interiorStyleInterp ...
Definition: CgmObj.h:703
DPoint m_end
start vector
Definition: CgmObj.h:1378
void RotatePts(DPoint center, double angle, DPoint *points, long nPoints)
rotate a list of point
Definition: CgmObj.cpp:711
DPoint * m_points
number of control porint
Definition: CgmObj.h:1451
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:6726
char m_halo
gap between number and line in mm
Definition: CgmObj.h:1574
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:4000
CCgmEllipse – Ellipse and EllipticalArc elements container class.
Definition: CgmObj.h:1309
long GetHandleCount()
return number of edit handles
Definition: CgmObj.cpp:1677
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:2196
long m_bytesPerLine
number of bytes per scan line
Definition: CgmObj.h:974
bool m_transpCellColorFlag
transparent cell color indicator
Definition: CgmObj.h:1023
DPoint m_end
end vector, if 3 POINT arc this is end point
Definition: CgmObj.h:1295
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:6777
ConnectType
Definition: CgmObj.h:1542
DPoint m_center
connecting line dogleg point
Definition: CgmObj.h:1569
CColor m_fillColor
fill color
Definition: CgmObj.h:671
CCgmNurb – Non-Uniform B-Spline & Rational B-Spline(Nurbs) element container class.
Definition: CgmObj.h:1440
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:7318
int m_action
Definition: CgmObj.h:1681
char m_closure
elliptical arc closure
Definition: CgmObj.h:1352
double m_characterHeight
character expansion factor
Definition: CgmObj.h:828
double m_lineWidth
line width
Definition: CgmObj.h:716
DPoint GetHandle(long nHandle, int *pType, double handleOffset=0)
return position of specified edit handle
Definition: CgmObj.cpp:4454
DPoint m_Pt
tile starting position
Definition: CgmObj.h:1093
struct Larson::CCgmTileArray::@28 m_cellSize
void MoveEditHandle(long nHandle, bool bAspect, DPoint point)
move position of specified edit handle
Definition: CgmObj.cpp:1195
ConnectType m_connect
outline type 0= none, 1= circle, 2= rectangle
Definition: CgmObj.h:1566
DPoint m_cj_radius_end
endpoint of transverse radius
Definition: CgmObj.h:1376
figure data structure used by figure
Definition: Figure.h:33
CCgmCellArray – CellArray element container class.
Definition: CgmObj.h:933
float m_beginArrowheadWidth
Beginning arrowhead width and height expressed as a multiple of linewidth.
Definition: CgmObj.h:1512
CCgmFigure – Figure and Compund Line element container class.
Definition: CgmObj.h:1110
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:6262
void CopyBase(CCgmBaseObj *p)
Copy attributes of object p to this object.
Definition: CgmObj.cpp:160
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:3159
DPoint m_Pts[3]
cell array corners, P, Q and R
Definition: CgmObj.h:980
unsigned char m_generalizedTextPathMode
restricted text type, see enum RestrTextType
Definition: CgmObj.h:867
long m_nPts
number of point in point list
Definition: CgmObj.h:1658
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.cpp:6763
void DeletePoint(long index)
delete specified point in points list.
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:8047
long SaveClipping(CGMLIB2_HANDLE hCGMLIB2)
save clipping during CGM save operation
Definition: CgmObj.cpp:907
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:9019
CCgmArrow::ArrowheadType m_arrowheadType
call center point, text, circle and rectangle will be centered on this point
Definition: CgmObj.h:1570
DRect IntersectClip(DRect rect)
tests for intersection of rect with bounds this element
Definition: CgmObj.cpp:356
virtual PolyPolylineData * ConvertToPoints(double step=0)
standard convert figure to points (sans bounds information)
Definition: CgmObj.cpp:7493
virtual void ConvertColors(int monoEnhance, int colorConvert)
convert colors of this element as specified
Definition: CgmObj.cpp:205
DPoint m_cdp1
first conjugate diameter endpoint
Definition: CgmObj.h:1344
const CCgmCallout & operator=(const CCgmCallout &a)
halo line width expressed as multiple of line width
Definition: CgmObj.cpp:8733
virtual long GetHandleCount()
return number of edit handles
Definition: CgmObj.cpp:340
DPoint m_start
elliptical arc start vector
Definition: CgmObj.h:1348
void MoveEditHandle(long nHandle, bool bAspect, DPoint point)
move position of specified edit handle
Definition: CgmObj.cpp:1900
long GetHandleCount()
return number of edit handles
Definition: CgmObj.cpp:8980
virtual void ReCalcBounds()
recalculates bounds of this element, e.g. after geometry is modified
Definition: CgmObj.cpp:2662
enum Shape m_nShape
element shape, e.g. polyline, disjointPolyline ...
Definition: CgmObj.h:709
CPatternTables::PatternBundle * m_patternBundle
pointer to pattern table bundle, NULL if interiorStyle != interiorStylePattern
Definition: CgmObj.h:713
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:5488
virtual void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:2519
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:6088
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:1356
DPoint m_cdp2
second conjugate diameter endpoint
Definition: CgmObj.h:1346
virtual bool IsRaster()
true if this is a raster type element, e.g Cell Array
Definition: CgmObj.cpp:415
DPoint GetHandle(long nHandle, int *pType, double handleOffset=0)
return position of specified edit handle
Definition: CgmObj.cpp:5306
void ReCalcBounds()
recalculates bounds of this element, e.g. after geometry is modified
Definition: CgmObj.cpp:9333
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:5545
DPoint GetHandle(long nHandle, int *pType, double handleOffset=0)
return position of specified edit handle
Definition: CgmObj.cpp:1682
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:4081
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.cpp:8553
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.cpp:3402
void ReCalcBounds()
recalculates bounds of this element, e.g. after geometry is modified
Definition: CgmObj.cpp:8519
long GetNumberPolygons()
get number of sub polygons in polygon set, returns 1 if not a polygon set
Definition: CgmObj.cpp:1697
bool IsFill()
true if this is a filled graphical element
Definition: CgmObj.cpp:4443
void ReCalcBounds()
recalculates bounds of this element, e.g. after geometry is modified
Definition: CgmObj.cpp:4016
float m_mitreLimit
mitre limit
Definition: CgmObj.h:697
int m_compressedLength
if m_precision == 32 and this is >0 this m_CellColors are RLE compressed
Definition: CgmObj.h:972
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:1077
unsigned char m_characterSetIndex
generalized text path mode
Definition: CgmObj.h:869
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:200
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:5846
bool IsFill()
true if this is a filled graphical element
Definition: CgmObj.cpp:6711
std::wstring m_text
retricted text height
Definition: CgmObj.h:840
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:6682
unsigned char * m_cellColors
cell colors
Definition: CgmObj.h:970
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:1477
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:7898
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:3670
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
save this element to CGM file
Definition: CgmObj.cpp:9386
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.cpp:4069
void DrawPath(CDrawBase *pDB, Path *path, bool fill)
draw graphical path
Definition: CgmObj.cpp:259
virtual long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
save this element to CGM file
Definition: CgmObj.cpp:2683
DPoint m_start
endpoint of conjugate radius
Definition: CgmObj.h:1377
unsigned char m_lineJoin
LineJoinIndicator.
Definition: CgmObj.h:681
virtual void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:255
double m_restrictedTextHeight
retricted text width
Definition: CgmObj.h:838
DPoint m_start
start vector, if 3 POINT arc this is start point
Definition: CgmObj.h:1293
struct Larson::CCgmTileArray::@30 m_imageCells
CCgmRect – Rectangle element container class.
Definition: CgmObj.h:751
void DeletePoint(long index)
delete specified point in points list.
Definition: CgmObj.cpp:1577
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
save this element to CGM file
Definition: CgmObj.cpp:5240
long SaveFillAttr(CGMLIB2_HANDLE hCGMLIB2)
save fill attributes during CGM save operation
Definition: CgmObj.cpp:765
float m_arrowheadWidth
arrowhead type and end of connecting line
Definition: CgmObj.h:1571
char m_closure
closure type, pie or chord
Definition: CgmObj.h:1299
DPoint m_dogleg
connecting line anchor point
Definition: CgmObj.h:1568
virtual void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:993
CDrawBase – drawing base class from which all output specific draw classes are derived.
Definition: DrawBase.h:19
long m_transformationApplication
transformation application, if true transform is applied when copies
Definition: CgmObj.h:1612
virtual bool IsFill()
true if this is a filled graphical element
Definition: CgmObj.cpp:385
PolyPolylineData – poly-polyline data container class.
Definition: PolyPolylineData.h:6
long m_name
id of segment to be copied
Definition: CgmObj.h:1607
void AddPoint(DPoint point, long index)
add point to points list
Definition: CgmObj.cpp:9740
straight connecting line
Definition: CgmObj.h:1545
long GetHandleCount()
return number of edit handles
Definition: CgmObj.cpp:5298
PolyPolylineData * ConvertToPoints(double step=0)
convert this element to list of points
Definition: CgmObj.cpp:4157
long m_hatchPatternIndex
hatch index, NULL if interiorStyle != interiorStyleHatch
Definition: CgmObj.h:701
unsigned char m_lineDashCap
LineDashCapIndicator.
Definition: CgmObj.h:679
DPoint m_end_pt
start point
Definition: CgmObj.h:1416
unsigned char m_fillInteriorStyle
fill interior style
Definition: CgmObj.h:685
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:2064
virtual ~CCgmTileArray()
Destructor.
Definition: CgmObj.cpp:6810
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:1114
struct Larson::CCgmCellArray::@25 m_nCells
number cells in x and y
long SaveFirstText(CGMLIB2_HANDLE hCGMLIB2, CCgmText *pFirst, bool unicode)
alternate character set index
Definition: CgmObj.cpp:2781
virtual bool IsText()
true if this is text element
Definition: CgmObj.cpp:2657
virtual void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:1603
Path * m_path
used for AppendText to link to parent text
Definition: CgmObj.h:850
CCgmParabolicArc – ParabolicArc element container class.
Definition: CgmObj.h:1402
CCgmPolySymbol – PolySymbol element container class.
Definition: CgmObj.h:1641
void MoveEditHandle(long nHandle, bool bAspect, DPoint point)
move position of specified edit handle
Definition: CgmObj.cpp:4544
PolyPolylineData * ConvertToPoints(double step=0)
convert this element to list of points
Definition: CgmObj.cpp:1488
long m_contIndicator
polybezier continuation indicator, PolyBezier only
Definition: CgmObj.h:904
float m_gap
distance from the base of the arrow to its vertex expressed as multiple of line width ...
Definition: CgmObj.h:1573
long m_lineProgressionDir
line progression direction 0= 90 degrees, 1= 270 degrees
Definition: CgmObj.h:1091
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:5234
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.h:1281
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
save this element to CGM file
Definition: CgmObj.cpp:7912
unsigned char m_lineCap
LineCapIndicator.
Definition: CgmObj.h:677
virtual bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:345
void ReCalcBounds()
recalculates bounds of this element, e.g. after geometry is modified
Definition: CgmObj.cpp:1285
float m_arrowheadHeight
distance between the endpoints of the base of the arrow expressed as multiple of line width ...
Definition: CgmObj.h:1572
void AddPoint(DPoint point, long index)
add point to points list
Definition: CgmObj.cpp:1420
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.cpp:7305
DRect GetBounds(bool locus=false)
get geoemtric extents of this object, if locus = false this will be visible bounds including line or ...
Definition: CgmObj.cpp:528
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:9446
DPoint m_end
elliptical arc end vector
Definition: CgmObj.h:1350
long SaveLineAttr(CGMLIB2_HANDLE hCGMLIB2)
save line attributes during CGM save operation
Definition: CgmObj.cpp:887
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.h:772
ClipRectangle * m_clipRectangle
pointer to clip rectangle object: 0= no rectangular clipping, ohterwise poiner to object ...
Definition: CgmObj.h:707
Path – graphical path data container class.
Definition: Path.h:17
bool IsRaster()
true if this is a raster type element, e.g Cell Array
Definition: CgmObj.cpp:7286
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:5963
unsigned char m_textPrecision
text path
Definition: CgmObj.h:863
void ConvertColors(int monoEnhance, int colorConvert)
convert colors of this element as specified
Definition: CgmObj.cpp:6902
struct Larson::CCgmText::@24 m_textAlignment
text font index
long biTonal
Definition: CgmObj.h:1051
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:4493
struct Larson::CCgmText::@22 m_characterOrientation
character height
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:4571
long m_nWeights
parameter end value
Definition: CgmObj.h:1455
unsigned char * colors
color specifiers
Definition: CgmObj.h:1037
DPoint m_center
centre of ellipse or elliptical arc
Definition: CgmObj.h:1342
Definition: PatternTables.h:27
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.h:1390
double * m_weights
number of weights (Rational B-Spline only)
Definition: CgmObj.h:1456
void arcSmallToBeziers(double radius, double a1, double a2, DPoint *polyBez)
Definition: CgmObj.cpp:9586
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision=false)
save this element to CGM file
Definition: CgmObj.cpp:6961
virtual void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:3037
CCgmPoly – Poly elements container class(Polyline, PolyBezier, Polygon, Disjoint Polyline) ...
Definition: CgmObj.h:883
CCgmMessage – message or application data primitive element container class.
Definition: CgmObj.h:1674
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:6955
CCgmTileArray – TileArray element container class.
Definition: CgmObj.h:995
CCgmCopySegment – CopySegment element container class.
Definition: CgmObj.h:1590
bool IsFill()
true if this is a filled graphical element
Definition: CgmObj.cpp:1887
virtual long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression=BwRasterCompressionNone, int colorCompression=ColorRasterCompressionNone, bool unicode=false, bool bRGBa=false, int vdcPrecision=0)
save this element to CGM file
Definition: CgmObj.cpp:264
CCgmBaseObj – graphical element container base class.
Definition: CgmObj.h:121
float m_endArrowheadWidth
Ending arrowhead width and height expressed as a multiple of linewidth.
Definition: CgmObj.h:1516
ArrowheadType m_beginType
Beginning Arrowhead Type, 0 = none.
Definition: CgmObj.h:1507
DPoint m_anchor
connecting line type
Definition: CgmObj.h:1567
DPoint GetHandle(long nHandle, int *pType, double handleOffset=0)
return position of specified edit handle
Definition: CgmObj.cpp:8990
unsigned char m_final
horizontal and vertical text alignment
Definition: CgmObj.h:859
CCgmTrace – Trace GDP element container class.
Definition: CgmObj.h:1148
long GetHandleCount()
return number of edit handles
Definition: CgmObj.h:812
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
list of weights (Rational B-Spline only)
Definition: CgmObj.cpp:6688
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
save this element to CGM file
Definition: CgmObj.cpp:4006
void Draw(CDrawBase *pDB)
Draw Segment contents.
Definition: CgmObj.cpp:9465
unsigned char m_lineWidthSpecMode
line width specfication mode
Definition: CgmObj.h:683
long GetHandleCount()
return number of edit handles
Definition: CgmObj.cpp:6721
CCgmGdp – generalized drawing primitive element container class.
Definition: CgmObj.h:1616
bool m_transpCellColorFlag
transparent cell color indicator
Definition: CgmObj.h:984
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.h:1428
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
save this element to CGM file
Definition: CgmObj.cpp:8565
void TransformBy(CMatrix *pXForm)
transform this element with specified matrix
Definition: CgmObj.cpp:5916
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:8036
void MoveEditHandle(long nHandle, bool bAspect, DPoint point)
move position of specified edit handle
Definition: CgmObj.cpp:5435
struct Larson::CCgmText::@23 m_textAlignmentCont
text extents
CCgmText – Text and RestrictedText elements container class.
Definition: CgmObj.h:794
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:8755
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:1143
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
save this element to CGM file
Definition: CgmObj.cpp:4393
void MoveEditHandle(long nHandle, bool bAspect, DPoint point)
move position of specified edit handle
Definition: CgmObj.cpp:6131
CMatrix – transform matrix class.
Definition: Matrix.h:16
bool IsFill()
true if this is a filled graphical element
Definition: CgmObj.cpp:5361
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
end vector
Definition: CgmObj.cpp:5796
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.cpp:9368
struct Larson::CCgmTileArray::@27 m_nCells
long m_cellPathDir
cell path direction
Definition: CgmObj.h:1089
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
save this element to CGM file
Definition: CgmObj.cpp:1120
CTextExtents – text extents container.
Definition: TextExtent.h:18
DPoint m_start
starting postion
Definition: CgmObj.h:1173
CTextExtent m_textExtent
text string
Definition: CgmObj.h:842
bool IsFill()
true if this is a filled graphical element
Definition: CgmObj.cpp:7982
CColor m_auxColor
auxilary color, i.e. relevant when transparencyOn
Definition: CgmObj.h:669
ClippingPath * m_clippingPath
pointer to clipping path object i.e. protection regions
Definition: CgmObj.h:705
void ReCalcBounds()
recalculates bounds of this element, e.g. after geometry is modified
Definition: CgmObj.cpp:7291
long m_nControlPts
spline order
Definition: CgmObj.h:1450
PolyPolylineData * ConvertToPoints(double step=0)
convert this element to list of points
Definition: CgmObj.cpp:4802
void ConvertColors(int monoEnhance, int colorConvert)
convert colors of this element as specified
Definition: CgmObj.cpp:3170
bool IsRaster()
true if this is a raster type element, e.g Cell Array
Definition: CgmObj.cpp:3692
color data this tile
Definition: CgmObj.h:1035
CColor m_transpCellColor
transparent cell color
Definition: CgmObj.h:1025
void ReCalcBounds()
recalculates bounds of this element, e.g. after geometry is modified
Definition: CgmObj.cpp:1972
DRect BoundsFromPts(DPoint *pts, long nPts)
calculate the bound rectangle fron a list of points
Definition: CgmObj.cpp:46
PolyPolylineData * ConvertToPoints(double step=0)
convert this element to list of points
Definition: CgmObj.cpp:6273
virtual void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.h:817
float m_haloSize
halo line width expressed as multiple of line width
Definition: CgmObj.h:1522
CCgmArrow – Arrow element container class, note- not a standard ISO CGM element.
Definition: CgmObj.h:1481
bool HitTest(DPoint point, double margin, int *pSegIndex=NULL)
true if point touches this element within margin
Definition: CgmObj.cpp:5388
CInterpInteriorParams – Interpolated Interior Style parameters.
Definition: InterpInteriorParams.h:12
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:5790
double m_restrictedTextWidth
character spacing
Definition: CgmObj.h:836
PolyPolylineData * ConvertToPoints(double step=0)
convert this element to list of points
Definition: CgmObj.cpp:5974
CColor m_transpCellColor
transparent cell color
Definition: CgmObj.h:986
long GetHandleCount()
return number of edit handles
Definition: CgmObj.cpp:6083
long m_textFontIndex
text position, can be a compound text path
Definition: CgmObj.h:852
double m_startValue
list of knots
Definition: CgmObj.h:1453
void ReCalcBounds()
recalculates bounds of this element, e.g. after geometry is modified
Definition: CgmObj.cpp:3733
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:6033
virtual CCgmBaseObj * Clone()
return copy of this object, new memory is allocated for lists
Definition: CgmObj.cpp:7482
DPoint m_start_pt
tangent intersect point
Definition: CgmObj.h:1415
char m_halo
add line halo 0= off, 1= on
Definition: CgmObj.h:1520
void Draw(CDrawBase *pDB)
draw this element to specfied drawing object
Definition: CgmObj.cpp:7872
virtual PolyPolylineData * ConvertToPoints(double step=0)
convert this element to list of points
Definition: CgmObj.cpp:219
DPoint GetHandle(long nHandle, int *pType, double handleOffset=0)
return position of specified edit handle
Definition: CgmObj.cpp:2524
long Save(CGMLIB2_HANDLE hCGMLIB2, int bwCompression, int colorCompression, bool unicode, bool bRGBa, int vdcPrecision)
save this element to CGM file
Definition: CgmObj.cpp:1609
DPoint GetHandle(long nHandle, int *pType, double handleOffset=0)
return position of specified edit handle
Definition: CgmObj.cpp:6716
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.cpp:7877
void Restore(CCgmBaseObj *pObj)
restore the contents of this object from a copy
Definition: CgmObj.cpp:1961
CCgmObjects – CGM Picture container.
Definition: CgmObjects.h:472
struct Larson::CCgmTileArray::@26 m_nTiles
long GetHandleCount()
return number of edit handles
Definition: CgmObj.cpp:4484
no connecting line
Definition: CgmObj.h:1544
unsigned char * m_edges
edges list, PolyonsSet only
Definition: CgmObj.h:902
unsigned char m_altCharacterSetIndex
character set index
Definition: CgmObj.h:871
float m_lineTypeInitOff
element
Definition: CgmObj.h:699
char m_polygonType
polygon type, set by CgmIn
Definition: CgmObj.h:691