|
CGM Objects Library
|
Copyright (c) 2008-2012, Larson Software Technology, Inc. More...
Classes | |
| class | CAppStruct |
| CAppStruct – Application Structure (APS) container class. More... | |
| struct | CGMI_DS |
| decoder data stream structure More... | |
| struct | CGMI_FMTBL |
| decoder format table structure | |
| struct | VDC_PRECISIONS |
| class | CCgmIn |
| CCgmIn – CGM Input class. More... | |
| class | CgmInfo |
| CgmInfo – get CGM information. More... | |
| class | CCgmBaseObj |
| CCgmBaseObj – graphical element container base class. More... | |
| class | CCgmRect |
| CCgmRect – Rectangle element container class. More... | |
| class | CCgmText |
| CCgmText – Text and RestrictedText elements container class. More... | |
| class | CCgmPoly |
| CCgmPoly – Poly elements container class(Polyline, PolyBezier, Polygon, Disjoint Polyline) More... | |
| class | CCgmCellArray |
| CCgmCellArray – CellArray element container class. More... | |
| class | CCgmTileArray |
| CCgmTileArray – TileArray element container class. More... | |
| class | CCgmFigure |
| CCgmFigure – Figure and Compund Line element container class. More... | |
| class | CCgmTrace |
| CCgmTrace – Trace GDP element container class. More... | |
| class | CCgmCircle |
| CCgmCircle – Circle and CircularArc elements container class. More... | |
| class | CCgmEllipse |
| CCgmEllipse – Ellipse and EllipticalArc elements container class. More... | |
| class | CCgmHyperbolicArc |
| CCgmHyperbolicArc – HyperbolicArc element container class. More... | |
| class | CCgmParabolicArc |
| CCgmParabolicArc – ParabolicArc element container class. More... | |
| class | CCgmNurb |
| CCgmNurb – Non-Uniform B-Spline & Rational B-Spline(Nurbs) element container class. More... | |
| class | CCgmArrow |
| CCgmArrow – Arrow element container class, note- not a standard ISO CGM element. More... | |
| class | CCgmCallout |
| CCgmCallout – Callout element container class, note- not a standard ISO CGM element. More... | |
| class | CCgmCopySegment |
| CCgmCopySegment – CopySegment element container class. More... | |
| class | CCgmGdp |
| CCgmGdp – generalized drawing primitive element container class. More... | |
| class | CCgmPolySymbol |
| CCgmPolySymbol – PolySymbol element container class. More... | |
| class | CCgmMessage |
| CCgmMessage – message or application data primitive element container class. More... | |
| class | ClassCallback |
| struct | CgmInError |
| encountered while in picture open state More... | |
| class | ElementCallback |
| define an interface class for CgmIn element callback More... | |
| class | CCgmObjects |
| CCgmObjects – CGM Picture container. More... | |
| class | ClippingPath |
| ClippingPath – ClippingPath data container class. More... | |
| class | ClipRectangle |
| ClipRectangle – Clipping rectangle data container class. More... | |
| class | CClipping |
| CClipping – contsruct and maintain ClippingPath data. More... | |
| class | CDrawBase |
| CDrawBase – drawing base class from which all output specific draw classes are derived. More... | |
| class | CDrawGDI |
| CDrawGDI – GDI drawing class. More... | |
| class | CDrawGL |
| CDrawGL – OpenGL drawing class. More... | |
| class | CDrawSVG |
| CDrawSVG – SVG drawing class. More... | |
| class | PicElement |
| PicElement – Picture element list container, each list element will be pointer to a Graphical Element or an Application Structure but not both. More... | |
| class | CElementList |
| CElementList – Picture elements list. More... | |
| class | CFigure |
| CFigure – Figure data class. More... | |
| class | CLSTFont |
| CLSTFont – Font object class, one per facename used in a CGM picture. More... | |
| class | MapEntry |
| FontCache map entry. More... | |
| class | CFontCache |
| CFontCache – generates and maintains font cache. More... | |
| class | CFontCacheEntry |
| CFontCacheEntry – defines the data in a font cache entry. More... | |
| class | CFontDesignGroup |
| CFontDesignGroup – font design attributes. More... | |
| class | CFontMap |
| CFontMap – Container for font objects of a CGM picture and used for text drawing and metrics in DrawBase classes. More... | |
| class | CFontProperties |
| CFontProperties – FontProperties attributes. More... | |
| class | CGeometricPatternTables |
| CGeometricPatternTables – pattern tables container class. More... | |
| class | CHatchStyles |
| CHatchStyles – contains user defined Hatch Style definitions. More... | |
| class | CInterpInteriorParams |
| CInterpInteriorParams – Interpolated Interior Style parameters. More... | |
| class | CLineEdgeTypes |
| CLineEdgeTypes – contains user defined Line and Edge type definitions. More... | |
| class | CCgmAttrState |
| class | MakeCgmObjs |
| MakeCgmObjs – CGM primitive object creation functions. More... | |
| class | CMatrix |
| CMatrix – transform matrix class. More... | |
| class | Parser |
| Parser – CGM input element parser. More... | |
| class | Path |
| Path – graphical path data container class. More... | |
| class | CPatternTables |
| CPatternTables – pattern tables container class. More... | |
| class | PolyPolylineData |
| PolyPolylineData – poly-polyline data container class. More... | |
| class | CSegment |
| CSegment – Segment class- a segment is a list of picture elements. More... | |
| class | CTextExtent |
| CTextExtents – text extents container. More... | |
| struct | aciHatchStyleDefStruct |
| WebCGM 2.1 ACI Hatch Style Definition structure. More... | |
| struct | aciLineEdgeTypeDefStruct |
| WebCGM 2.1 ACI Line and Edge Definition structure. More... | |
| struct | aciConfigStruct |
| WebCGM 2.1 Application Configurable Items (ACI) file structure. More... | |
Typedefs | |
| typedef struct Larson::CGMI_DS | CGMI_DS |
| decoder data stream structure | |
|
typedef struct Larson::VDC_PRECISIONS | VDC_PRECISIONS |
| typedef struct Larson::CgmInError | CgmInError |
| encountered while in picture open state | |
|
typedef multimap< wchar_t, MapEntry, less< wchar_t > > | cache_type |
|
typedef struct Larson::aciHatchStyleDefStruct | webcgmHatchStyleDefStruct |
| WebCGM 2.1 ACI Hatch Style Definition structure. | |
|
typedef struct Larson::aciLineEdgeTypeDefStruct | webcgmLineEdgeTypeDefStruct |
| WebCGM 2.1 ACI Line and Edge Definition structure. | |
| typedef struct Larson::aciConfigStruct | webcgmConfig |
| WebCGM 2.1 Application Configurable Items (ACI) file structure. More... | |
Functions | |
| long | cellDecode (unsigned long bit_offset, long local_color_prec, unsigned char *ucp, unsigned long max_ndx, long *error) |
| void | cgmi_d_ce (unsigned char *cgmp, long *total, long *klass, long *element, long *count, CGMI_DS *cgmi_ds) |
| void | cgmi_d_ce_ctx (char elemstr[128], long *klass, long *element) |
| CGM clear text decode class and element. | |
| long | cgmi_d_co (CGMI_DS **cgmi_ds, unsigned long *op, long cnt, CGMI_FMTBL it, long colorSelectionMode) |
| this group of functions returns the number of items decoded (note: 1 pt => 2 vdc) More... | |
| long | cgmi_d_ew (CGMI_DS **cgmi_ds, double *op, long cnt, CGMI_FMTBL it, long ewSpecMode, VDC_PRECISIONS vdcPrecisions) |
| long | cgmi_d_fp (CGMI_DS **cgmi_ds, double *op, long cnt, const long *fp) |
| long | cgmi_d_fx (CGMI_DS **cgmi_ds, double *op, long cnt, long *fx) |
| long | cgmi_d_lw (CGMI_DS **cgmi_ds, double *op, long cnt, CGMI_FMTBL it, long lwSpecmode, VDC_PRECISIONS vdcPrecisions) |
| long | cgmi_d_ms (CGMI_DS **cgmi_ds, double *op, long cnt, CGMI_FMTBL it, long msSpecmode, VDC_PRECISIONS vdcPrecisions) |
| long | cgmi_d_r (CGMI_DS **cgmi_ds, double *op, long cnt, CGMI_FMTBL it) |
| long | cgmi_d_s (CGMI_DS **cgmi_ds, wchar_t *op, long cnt, long *chrtyp) |
| long | cgmi_d_sdre (CGMI_DS *cgmi_ds, long n, void **outbfp, long buftyp, CGMI_FMTBL it, long *p_data_type_index, VDC_PRECISIONS vdcPrecisions) |
| long | cgmi_d_si (CGMI_DS **cgmi_ds, long *op, long cnt, long si_precision) |
| long | cgmi_d_e (CGMI_DS **cgmi_ds, long *op, long cnt, long element) |
| long | cgmi_d_bs (CGMI_DS **cgmi_ds, unsigned char *op) |
| long | cgmi_d_ui (CGMI_DS **cgmi_ds, unsigned long *op, long cnt, long ui_precision) |
| long | cgmi_d_vdc (CGMI_DS **cgmi_ds, double *op, long cnt, CGMI_FMTBL it, VDC_PRECISIONS vdcPrecisions) |
| long | cgmi_d_cdi (CGMI_DS **cgmi_ds, unsigned long *op, long cnt, long ui_precision, long ui_parts) |
| CGM Utility Decode Color for internal use only. | |
| long | cgmi_sulen (CGMI_DS *cgmi_ds) |
| long | cgmi_nchars (long length, long encoding) |
| determine number of characters in string for this encoding | |
| void | cgmi_eswab2 (long n, short *buf) |
| void | cgmi_eswab4 (long n, unsigned long *buf) |
| double | get_power_of_ten (long exponent, long negative) |
| long | getPrecFromInt (unsigned long maxint) |
| long | getPrecFromSignedInt (long maxint) |
| void | trimFontName (std::wstring &name) |
| std::wstring | normalizeFontName (std::wstring &name) |
| bool | PtInPolygon (DPoint *polygon, int N, DPoint p) |
| bool | PtInPolygonSet (DPoint *polygon, int np, unsigned char *edges, DPoint p) |
| bool | PtOnLine (DPoint pt0, DPoint pt1, DPoint ptMouse, double nWidth) |
| bool | IntersectLines (DPoint &p0, DPoint &p1, DPoint &p2, DPoint &p3, DPoint *i) |
| void | QuadraticToCubicBezier (DPoint &QP0, DPoint &QP1, DPoint &QP2, DPoint *CP1, DPoint *CP2) |
| double | PolygonArea (DPoint *polygon, int nPoints) |
Variables | |
| unsigned short | defpats16 [NPATS16][HW16] |
| unsigned short const | defpats884 [NPATS16][HW16] |
Copyright (c) 2008-2012, Larson Software Technology, Inc.
Copyright (c) 2012-2013, Larson Software Technology, Inc.
Copyright (c) 2015, Larson Software Technology, Inc.
// Usage example:
#inlcude "CgmInfo" using namespace Larson; using namespace std;
wstring cgmFile = allelm01.cgm";
// open a cgm file and extract metafile and picture inofmration
CgmInfo info(cgmFile);
// get metafile descriptor information
CgmInfo::MetafileInfo mfInfo;
info.getMetafileInfo(mfInfo);
// get list of pictures and information about each picture
vector<CgmInfo::PictureInfo> picsInfo;
info.getPictureInfo(picsInfo);
for (size_t i = 0; i < picsInfo.size(); i++)
{
// print size of each picture in MM
double width = (abs(picsInfo[i].vdcExtent[1].x - picsInfo[i].[0].x) * picsInfo[i].scalingFactor);
double height = (abs(picsInfo[i].vdcExtent[1].y - picsInfo[i].vdcExtent[0].y) * picsInfo[i].scalingFactor);
cout << "width and height in MM = " << width << ", " << height << endl;
| typedef struct Larson::aciConfigStruct Larson::webcgmConfig |
WebCGM 2.1 Application Configurable Items (ACI) file structure.
The ACI file provides a mechanism to specify default handling for certain CGM Version 3 elements that may not have a specific default treatment according to the rules of CGM:1999 or the WebCGM profile.
| long Larson::cgmi_d_bs | ( | CGMI_DS ** | cgmi_ds, |
| unsigned char * | op | ||
| ) |
CGM Decode Cleartext Tile Array Hex Bitstream
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| void Larson::cgmi_d_ce | ( | unsigned char * | cgmp, |
| long * | total, | ||
| long * | klass, | ||
| long * | element, | ||
| long * | count, | ||
| CGMI_DS * | cgmi_ds | ||
| ) |
CGM Utility Decode Class and Element calls to cgmi_d_xxx routines.
| cgmp | [IN] beginning of a CGM packet data |
| total | [OUT] total number of bytes in CGM element |
| klass | [OUT] element class number |
| element | [OUT] element id |
| count | [OUT] parement list length in bytes |
| cgmi_ds | [IN/OUT] pointer to cgm data stream struct |
| long Larson::cgmi_d_co | ( | CGMI_DS ** | cgmi_ds, |
| unsigned long * | op, | ||
| long | cnt, | ||
| CGMI_FMTBL | it, | ||
| long | colorSelectionMode | ||
| ) |
this group of functions returns the number of items decoded (note: 1 pt => 2 vdc)
CGM Utility Decode Color extract (decode) one or more colors (indexed or direct) from the CGM element based on and updating the info in the cgmi_ds data structure. This routine is the routine called when cgmi_d_co is invoked. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| cnt | = number of items to decode |
| it | = decoder format table |
| long Larson::cgmi_d_e | ( | CGMI_DS ** | cgmi_ds, |
| long * | op, | ||
| long | cnt, | ||
| long | element | ||
| ) |
CGM Utility Decode Enum extract (decode) one or more enumerated values from the CGM element based on and updating the info in the cgmi_ds data structure. This is the actual routine called when cgmi_d_e is invoked. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| cnt | = number of items to decode |
| long Larson::cgmi_d_ew | ( | CGMI_DS ** | cgmi_ds, |
| double * | op, | ||
| long | cnt, | ||
| CGMI_FMTBL | it, | ||
| long | ewSpecMode, | ||
| VDC_PRECISIONS | vdcPrecisions | ||
| ) |
CGM Utility Decode Edge Width extract (decode) edge width from the CGM element based on and updating the info in the cgmi_ds data structure. This routine is the routine called when cgmi_d_ew is invoked. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| it | = decoder format table |
| long Larson::cgmi_d_fp | ( | CGMI_DS ** | cgmi_ds, |
| double * | op, | ||
| long | cnt, | ||
| const long * | fp | ||
| ) |
CGM Utility Decode Floating Point extract (decode) one or more floating points from the CGM element based on and updating the info in the cgmi_ds data structure. This routine is an internal routine called from cgmi_d_r or cgmi_d_vdc. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| cnt | = number of items to decode |
| fp | = floating ppoint precision; fp[0] = exponent length, fp[1] mantissa length; |
| long Larson::cgmi_d_fx | ( | CGMI_DS ** | cgmi_ds, |
| double * | op, | ||
| long | cnt, | ||
| long * | fx | ||
| ) |
CGM Utility Decode Fixed Point extract (decode) one or more fixed points from the CGM element based on and updating the info in the cgmi_ds data structure. This routine is an internal routine called from cgmi_d_r or cgmi_d_vdc. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| cnt | = number of items to decode |
| fx | = fixed point precision; fp[0] = exponent length, fp[1] mantissa length; |
| long Larson::cgmi_d_lw | ( | CGMI_DS ** | cgmi_ds, |
| double * | op, | ||
| long | cnt, | ||
| CGMI_FMTBL | it, | ||
| long | lwSpecmode, | ||
| VDC_PRECISIONS | vdcPrecisions | ||
| ) |
CGM Utility Decode Line Width extract (decode) line width from the CGM element based on and updatin the info in the cgmi_ds data structure. This routine is the routine called when cgmi_d_lw is invoked. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| it | = decoder format table |
| long Larson::cgmi_d_ms | ( | CGMI_DS ** | cgmi_ds, |
| double * | op, | ||
| long | cnt, | ||
| CGMI_FMTBL | it, | ||
| long | msSpecmode, | ||
| VDC_PRECISIONS | vdcPrecisions | ||
| ) |
CGM Utility Decode Marker Size extract (decode) marker size from the CGM element based on and updating the info in the cgmi_ds data structure. This routine is the routine called when cgmi_d_ms is invoked. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| it | = decoder format table |
| long Larson::cgmi_d_r | ( | CGMI_DS ** | cgmi_ds, |
| double * | op, | ||
| long | cnt, | ||
| CGMI_FMTBL | it | ||
| ) |
CGM Utility Decode Real extract (decode) one or more real from the CGM element based on and updating the info in the cgmi_ds data structure. This is the actual routine called when cgmi_d_r is invoked. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| it | = decoder format table |
| long Larson::cgmi_d_s | ( | CGMI_DS ** | cgmi_ds, |
| wchar_t * | op, | ||
| long | cnt, | ||
| long * | chrtyp | ||
| ) |
CGM Utility Decode String extract (decode) a variable length string from the CGM element based on and updating the info in the cgmi_ds data structure. This routine is called internally routine called from cgmi_d_sdre. This routine will add a NULL ((wchar_t)0) to the end of the string. returns: <0 = error, 0 = OK, >0 overflows
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| cnt | = sizeof output buffer in wchar_t units or ZERO (0) if output buffer needs to be allocated to hold output string |
| chrtype | = character encdoind type; CHR_ASCII, CHR_UTF8, CHR_UTF16, or -1 if not yet determined in which case it will be set to one of the 3 type |
| long Larson::cgmi_d_sdre | ( | CGMI_DS * | cgmi_ds, |
| long | n, | ||
| void ** | outbfp, | ||
| long | buftyp, | ||
| CGMI_FMTBL | it, | ||
| long * | p_data_type_index, | ||
| VDC_PRECISIONS | vdcPrecisions | ||
| ) |
CGM Utility Decode Standard Data Record (SDR) If an output buffer is not provided (i.e. it is NULL) and there is data (i.e. data_type_count > 0) an output buffer is 'malloc'ed and it is the callers responsibility to 'free' it later [the caller knows if it sent a NULL output buffer]. return actual number decoded
| cgmi_ds | = pointer to input stream structure |
| n | = number of items to decode |
| outbfp | = pointer to output buffer |
| it | = decoder format table |
| p_data_type_index | = pointer to SDR data type |
| long Larson::cgmi_d_si | ( | CGMI_DS ** | cgmi_ds, |
| long * | op, | ||
| long | cnt, | ||
| long | si_precision | ||
| ) |
CGM Utility Decode Signed Integer extract (decode) one or more signed integers from the CGM element based on and updating the info in the cgmi_ds data structure. This is the actual routine called when cgmi_d_ix, cgmi_d_e and cgmi_d_i are invoked. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| cnt | = number of items to decode |
| long Larson::cgmi_d_ui | ( | CGMI_DS ** | cgmi_ds, |
| unsigned long * | op, | ||
| long | cnt, | ||
| long | ui_precision | ||
| ) |
CGM Utility Decode Unsigned Integer extract (decode) one or more unsigned integers from the CGM element based on and updating the info in the cgmi_ds data structure. This is the actual routine called when cgmi_d_ci and cgmi_d_d are invoked. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| cnt | = number of items to decode |
| long Larson::cgmi_d_vdc | ( | CGMI_DS ** | cgmi_ds, |
| double * | op, | ||
| long | cnt, | ||
| CGMI_FMTBL | it, | ||
| VDC_PRECISIONS | vdcPrecisions | ||
| ) |
CGM Utility Decode Virtual Device Coordinate extract (decode) one or more VD coordinates from the CGM element based on and updating the info in the cgmi_ds data structure. This is the actual routine called when cgmi_d_p and cgmi_d_vdc is invoked. returns the number of items decoded
| cgmi_ds | = pointer to input stream structure |
| op | = output pointer |
| cnt | = number of items to decode |
| it | = decoder format table |
| long Larson::cgmi_sulen | ( | CGMI_DS * | cgmi_ds | ) |
determine number of bytes for S or SF data type - refer to Table 1 of ISO 8632-3 Binary Encoding for details for Clear Text decoding this will search for string delimiter
1.8.6