Full Name | Computer Graphics Metafile |
Format ID | IG_FORMAT_CGM = 75 |
File Extension(s) | *.cgm |
Data Type | Metafile Vector Image |
Data Encoding | Character-based, Binary, Clear-text encoded |
Color Profile Support | No |
Multi-Page Support | Yes |
Alpha Channel Support | No |
ImageGear 3D Image Support | No |
ImageGear Raster to Vector Format Conversion Support | No |
ImageGear Unicode Text Display Support | No |
ImageGear Platforms Support | Win32, Win64, .NET, .NET64 |
Filter Control Parameter | Type | Default Value | Available Values | Description |
---|---|---|---|---|
WIDTH | AT_INT32 | 512 | Any positive value | Defines the width of the empty DIB associated with the image after loading. DIB height is calculated using the file's scale factors. See Working with Vector Images. |
This is a standardized platform-independent format used for the interchange of bitmap and vector data.
CGM is a very feature-rich format which attempts to support the graphic needs of many general fields (graphic arts, technical illustration, cartography, visualization, electronic publishing, and so on). While the CGM format is rich in features (many graphical primitives and attributes), it is less complex than PostScript, produces much smaller (more compact) files, and allows the interchange of very sophisticated and artistic images.
Computer Graphics Metafile was developed by experts working on committees under the auspices of the International Standards Organization (ISO) and the American Standards National Institute (ANSI). It was specifically designed as a common format for the platform-independent interchange of bitmap and vector data, and for use in conjunction with a variety of input and output devices. Although CGM incorporates extensions designed to support bitmap (called raster in the CGM specification) data storage, files in CGM format are used primarily to store vector information. CGM files typically contain either bitmap or vector data, but rarely both.
CGM Element |
Supported Attributes |
Imported into ImageGear as: |
Font names |
Font name |
HIG_VECT_FONT objects. |
Color Model |
Color model |
Processed internally. Affects the interpretation of the colors when reading file content. |
Color selection mode |
Mode: True color or indexed |
Processed internally. Affects the interpretation of colors. |
Background color |
RGB color value |
Background color of the view. |
VDC extent |
Left Top Right Bottom |
Processed internally. Affects the interpretation of different ranges. Also, used as a range of the view. |
Begin Picture Body |
|
Processed internally. |
End Picture body |
|
Processed internally. |
Line and Edge type definition |
Type Pattern Pattern Length |
HIG_VECT_LINETYPE object. |
Edge width specification mode |
Mode: absolute, scaled, fraction, mm. |
Processed internally. Affects the interpretation of edge width of HIG_VECT_LINETYPE object. |
Line width specification mode |
Mode: absolute, scaled, fraction, mm. |
Processed internally. Affects the interpretation of line width of HIG_VECT_LINETYPE object. |
Marker size specification mode |
Mode: absolute, scaled, fraction, mm. |
Processed internally. Affects the interpretation of size of Poly Marker objects. |
Line representation |
Line type Line width Line color |
Affects the interpretation of Line and Polyline objects. |
Marker representation |
Marker type Marker size Marker color |
Affects the interpretation of Poly Marker objects. See Poly Marker section. |
Text representation |
Font index Precision Spacing Expansion Color |
Affects the interpretation of Text objects. |
Fill representation |
Font index Precision Spacing Expansion Color |
Used for creating HIG_VECT_FILLTYPE object when creating the filling entity. |
Edge representation |
Edge type Edge width Edge color |
Affects the interpretation of edges when creating such entity as IG_VECT_ENT_FIGURE (see below). |
Real Precision |
Fixed or floating indicator Whole part Fractional part |
Processed internally. Affects the interpretation of many floating-point parameters. |
Color index precision |
Precision |
Processed internally. Affects the interpretation of color indices. |
Index precision |
Precision |
Processed internally. Affects the interpretation of indices for different tables. |
VDC Integer precision |
Precision |
Processed internally. Affects the interpretation of many integer parameters. |
VDC real precision |
Precision |
Processed internally. Affects the interpretation of many floating-point parameters. |
Transparent cell colors |
On/Off flag Color |
Processed internally. Turns on/off the transparent color for cell array being represented by IG_VECT_RNT_RASTER (see below). |
Color precision |
Precision |
Processed internally. Affects the interpretation of true colors. |
Maximum color index |
Maximum index |
Processed internally. Defines a size of the internal palette. |
VDC type |
Type |
Processed internally. Defines a type of parameters – either integer or float. |
Integer precision |
Precision |
Processed internally. Affects the interpretation of many integer parameters. |
Color model |
Color model |
The only RGB is supported by the ImageGear CGM filter. |
Metafile default replacement |
Default replacement flag |
Processed internally. Turns on the default setting mode. |
Begin picture |
|
Defines begin of HIGEAR page. |
Begin figure |
|
Starts IG_VECT_ENT_FIGURE entity. All objects being read inside Begin figure/End figure block will be added to the figure entity container. |
End figure |
|
Finishes IG_VECT_ENT_FIGURE entity. See above. |
Color table |
RGB color values |
Processed internally. Creates the internal palette. |
Aspect source flags |
Type Value |
Processed internally. Affects the interpretation of different objects and parameters. |
Line Width |
Width |
Specifies a width for HIG_VECT_LINETYPE object. |
Line bundle index |
Index |
Specifies a set of predefined parameters for line objects. |
Line type |
Type |
Specifies a pattern for HIG_VECT_LINETYPE object. |
Line color |
Color |
Specifies IG_VECT_ENT_ATTR_DRAWCOLOR attribute for entities. |
Polyline |
Vertices |
IG_VECT_ENT_POLYLINE entity. |
Disjoined polyline |
Vertices |
IG_VECT_ENT_POLYLINE entity. |
Connection edge |
|
IG_VECT_ENT_CONNECTION entity. |
Clip rectangle |
First corner Second corner |
IG_VECT_ENT_VIEWPORT entity. |
New region |
|
New region for IG_VECT_ENT_FIGURE entity. |
Text bundle index |
Index |
Specifies a set of predefined parameters for text objects. |
Text color |
Color |
Specifies a color for HIG_VECT_TEXTOBJ object. |
Character height |
Height |
Specifies text height for HIG_VECT_TEXTOBJ object. |
Text font index |
Index |
HIG_VECT_FONT objects. |
Character spacing |
Spacing |
Specifies character spacing for HIG_VECT_TEXTOBJ object. |
Character expansion factor |
Expansion |
Used for calculating the character width for HIG_VECT_TEXTOBJ object. |
Restricted text type |
Type |
Specifies restriction type for IG_VECT_ENT_TEXT entity. |
Text alignment |
Horizontal alignment Vertical alignment |
Specifies an alignment for IG_VECT_ENT_TEXT entity. |
Text path |
Path |
Specifies an orientation of IG_VECT_ENT_TEXT entity. |
Character orientation |
XUp YUp XBase YBase |
Specifies an orientation of characters for HIG_VECT_TEXTOBJ object. |
Restricted text |
Delta width Delta height Text position Final/not final flag Text string |
IG_VECT_ENT_TEXT entity. |
Append text |
Final/not final flag Text string |
IG_VECT_ENT_TEXT entity. |
Text |
Text position Final/not final flag Text string |
IG_VECT_ENT_TEXT entity. |
Edge visibility |
Visibility |
Affects the creation of IG_VECT_ENT_ATTR_DRAWCOLOR and IG_VECT_ENT_ATTR_LINETYPE attributes for entities. |
Edge width |
Width |
Specifies IG_VECT_ENT_ATTR_THICKNESS attribute for entities. |
Edge bulge index |
Index |
Specifies a set of predefined parameters for polygon edges. |
Edge type |
Type |
Specifies a pattern for HIG_VECT_LINETYPE object. Applicable mostly to polylines. |
Edge color |
Color |
Specifies IG_VECT_ENT_ATTR_DRAWCOLOR attribute for entities. |
Fill bundle index |
Index |
Specifies a set of predefined parameters for HIG_VECT_FILLTYPE object. |
Interior style |
Style |
Specifies a pattern for HIG_VECT_FILLTYPE object. |
Fill color |
Color |
Specifies IG_VECT_ENT_ATTR_FILLCOLOR attribute for entities. |
Hatch index |
Index |
Specifies a pattern for HIG_VECT_FILLTYPE object if interior style is a hatch. |
Polygon |
Vertices |
IG_VECT_ENT_POLYLINEEX entity. |
Polygon set |
Vertices Edge out flags |
IG_VECT_ENT_POLYLINEEX entity. |
Rectangle |
First corner Second corner |
IG_VECT_ENT_POLYLINE entity. |
Circle |
Center Radius |
IG_VECT_ENT_ELLIPSE entity. |
Circular arc 3 point |
Starting point Intermediate point Ending point |
IG_VECT_ENT_ARC entity. |
Circular arc 3 point close |
Starting point Intermediate point Ending point Type of arc closure |
IG_VECT_ENT_ARC entity. |
Circular arc center |
Center Delta x for start vector Delta y for start vector Delta x for end vector Delta y for end vector |
IG_VECT_ENT_ARC entity. |
Circular arc center close |
Center Delta x for start vector Delta y for start vector Delta x for end vector Delta y for end vector Type of arc closure |
IG_VECT_ENT_ARC entity. |
Ellipse |
Center Endpoint of first conjugate diameter Endpoint of second conjugate diameter |
IG_VECT_ENT_ELLIPSE entity. |
Elliptical arc |
Center Endpoint of first conjugate diameter Endpoint of second conjugate diameter Delta x for start vector Delta y for start vector Delta x for end vector Delta y for end vector |
IG_VECT_ENT_ARC entity. |
Elliptical arc close |
Center Endpoint of first conjugate diameter Endpoint of second conjugate diameter Delta x for start vector Delta y for start vector Delta x for end vector Delta y for end vector Type of arc closure |
IG_VECT_ENT_ARC entity. |
Marker bundle index |
Index |
Specifies a set of predefined parameters for markers. See Poly Marker section. |
Marker type |
Type |
Specifies predefined type of marker. See Poly Marker section. |
Marker size |
Size |
Specifies size of marker. See Poly Marker section. |
Marker color |
Color |
Specifies color of marker. See Poly Marker section. |
Poly Marker |
Marker positions |
IG_VECT_ENT_BLOCK entity with several entities in its entity container. |
Cell array |
Corner point P Corner point Q Corner point R Nx Ny Local color precision Array of cell color values |
IG_VECT_ENT_RASTER entity. |
Begin tile array |
Position Path direction Line progression direction Number of tiles in path direction Number of tiles in line direction Number of cells/tile in path direction Number of cells/tile in line direction Cell size in path direction Cell size in line direction Image offset in path direction Image offset in line direction Image number of cells in path direction Image number of cells in line direction |
IG_VECT_ENT_BLOCK and IG_VECT_ENT_INSERTION entities. IG_VECT_ENT_INSERTION references IG_VECT_ENT_BLOCK. |
Tile |
Compression type
Row padding indicator Cell color precision Compression-specific parameters Bit stream |
IG_VECT_ENT_RASTER entity. |
End tile array |
|
Closes “Begin tile array”. |
Begin segment |
Segment identifier |
IG_VECT_ENT_BLOCK entity. |
Segment display priority |
Segment identifier Priority |
Used internally to sort segment blocks in the drawing. |
Copy segment |
Segment identifier Transformation matrix
|
IG_VECT_ENT_INSERTION entity that references the block specified by segment identifier. |
Polybezier |
Continuity indicator Control points |
IG_VECT_ENT_BEZIER_CURVE entity. |
Non-uniform B-spline |
Spline order Number of control points Control points List of knots |
IG_VECT_ENT_NURBS_CURVE entity. |
Non-uniform rational B-spline |
Spline order Number of control points Control points List of knots List of weights |
IG_VECT_ENT_NURBS_CURVE entity. |
End Picture |
|
Finishes reading the page. |
End segment |
|
Closes “Begin segment” element. |
End metafile |
|
Finishes reading the file. |
Only the content of active view is saved in CGM format. View content is transformed using view transformation when saving.
ImageGear Entity or Object |
Saved as CGM Element |
HIG_VECT_VIEW |
VDC extent. Begin picture body. End picture body. |
IG_VECT_ENT_BLOCK |
Sequence of CGM elements for every entity. |
IG_VECT_ENT_EASYLINE |
Polyline. |
IG_VECT_ENT_TEXT |
Text, Restricted text, Append text, depending on the entity settings. |
IG_VECT_ENT_POLYLINE |
Polyline or polygon, depending on the entity settings. |
IG_VECT_ENT_INSERTION |
Sequence of CGM elements for every entity in the referenced block. |
IG_VECT_ENT_RASTER |
Cell array. |
IG_VECT_ENT_ARC |
Circular arc 3 point, Circular arc 3 point close, Elliptical arc, Elliptical arc close, depending on the entity settings. |
IG_VECT_ENT_ELLIPSE |
Circle or Ellipse, depending on the entity settings. |
IG_VECT_ENT_NURBS_CURVE |
Non-uniform B-spline or Non-uniform rational B-spline, depending on the entity settings. |
IG_VECT_ENT_BEZIER_CURVE |
Polybezier. |
IG_VECT_ENT_NURBS_SURFACE |
The surface is saved as a set of Polyline objects, without interpolation and without taking into account knots and weights. |
IG_VECT_ENT_VIEWPORT |
Clip rectangle. |
IG_VECT_ENT_FIGURE |
“Begin Figure”, several “New Region” and “End Figure” objects. |
IG_VECT_ENT_CONNECTION |
Connecting Edge. |
IG_VECT_ENT_POLYLINEEX |
Polygon set. |
IG_VECT_ENT_EASY_SURFACE |
The surface is saved as a set of Polyline objects. |
IG_VECT_ENT_SHELL |
A set of Polyline or Polygon objects, depending on the entity settings. |
FN_IG_ENT_SOLID |
Polyline or Polygon object, depending on the entity settings. |