Up to cover page | Back to Introduction | On to Intelligent Content

2. WebCGM Concepts

2.1 The Structure of a WebCGM

A WebCGM is a Version 1, 2, 3, or 4 CGM as defined in ISO/IEC 8632:1992, with some restrictions. The restrictions improve the interoperability of WebCGM, and simplify the production of WebCGM interpreter (viewer) tools.

A WebCGM, as shown in Figure 1, consists of one or more Pictures. Each picture contains CGM graphic elements, as well as (optionally) Application Structures. Application Structures define objects within each picture, which are comprised of groups of graphical primitives. These intelligent objects may contain attributes or properties. WebCGM defines several types of groups - "graphical object", "paragraph", "layer", and "sub-paragraph" - as well as a few properties which each group may have.

WebCGM File Structure

Figure 1. WebCGM File Structure

2.2 Pictures

2.2.1 Pictures as Standalone Images

The picture is a basic building block of a WebCGM file. In the CGM standard, pictures are independent graphical presentations. In particular, as defined in the ISO standard, each picture has an implicit or explicit opaque background.

Many pictures may be stored in a single metafile. Properties which apply to all pictures are defined in the Metafile Descriptor. These include descriptive information about the metafile, the precisions of numbers, as well as identifiers for fonts and symbol libraries.

Properties which apply to the elements in the body of a single picture are contained in the Picture Descriptor. These include such information as picture size and scaling, specification modes for aspects such as line width, and background color.

CGM supports both raster and vector graphics in the same picture. WebCGM permits the use of popular raster compression methods - CCITT group 4, JPEG, and the deflate (LZ77 derivative) method of PNG - for raster content embedded within pictures.

For more information about scaling of WebCGM pictures in Web documents, see section WebCGM and the Object Tag |

Graphic elements within pictures are rendered in the order they appear in the metafile. Elements rendered first may be wholly or partially hidden by elements rendered later. In the ISO CGM standard, the writing mode of primitives is "replacement" - content is rendered opaquely on top of previous content. To meet per-primitive (and per-pixel) transparency requirements, WebCGM includes a registered extension for Alpha transparency, as well as registered colour models RGB-alpha and sRGB-alpha.

2.2.2 Pictures as Overlays

It is a requirement of a 2D graphics format for Web documents that pictures may be overlayed on previous content. For this, it must be controllable whether the picture background is opaque or transparent (both cases are needed), or "translucent" (partially opaque).

This may be handled in two ways with WebCGM. First, the "TRANSPARENT" parameter of the OBJECT tag may be used (see section "WebCGM and the OBJECT Tag"). Second, the registered Alpha-transparency ESCAPE element may be included in the Picture Descriptor and applied to the background colour of the picture.

2.2.3 Pictures as Symbols

WebCGM also contains provisions to use pictures in an external "Symbol Library Metafile" as symbols, and to instance them into another picture. The mechanism is identical to that of [grex24], and details may be found in the PPF and detailed normative clauses later in this document.

2.3 Intelligence - Objects, Layers, Hyperlinks, Metadata

2.3.1 Overview

Within a WebCGM picture, groups of graphical primitives can be defined which structure graphics to meet the requirements of integration into Web documents. Groups in WebCGM are realized as standard Version 4 Application Structures (APS) of ISO CGM.

Four specific group types are defined and allowed in WebCGM (Edition 1.0): 'grobject', 'layer', 'para', and 'subpara'. The detailed syntax and semantics of these, including viewer behavior, is defined in Section 2 and in the PPF. Below is a brief conceptual summary.

Every group has at least one explicit property, its unique identifier (a parameter of the Begin APS element). WebCGM groups may have several explicit attributes associated with them. These attributes are realized as standard Version 4 Application Structure Attribute elements (APS Attributes) of ISO CGM.

WebCGM defines a detailed content model for the V4 content, both in the form of a "SGML fragment", and in tabular form. See section, "WebCGM Content Model".

2.3.2 WebCGM Defined Group Types

WebCGM defines the following allowable group (APS) types, to support the Web document operations of hyperlinking, layered pictures, and text search within graphics:

The detailed syntax and semantics are presented later in this profile. WebCGM Edition 1.0 does not allow private group types. External private metadata can be associated, by ID, with 'grobject' APSs within a WebCGM. The mechanisms and semantics of such private metadata are beyond the scope of WebCGM Edition 1.0.

2.3.3 Usage of WebCGM Objects for Navigation

Groups of types 'para', 'subpara', and 'grobject' may be used for picking and navigation operations in hyperlinked Web documents. These three APS types are called "objects" in WebCGM.

Objects may contain an explicit 'region' APS Attribute, which provides the boundary for picking operations. This is known as the overlay model of object identification (for picking and linking). It is useful in cases of badly structured legacy graphics, raster content, and in some cases to optimize picking operations.

Objects which contain graphical content have an implicit property: the boundary or bounding extent of the enclosed graphical object. This extent is used for picking and navigation operations in hyperlinked Web documents, in the absence of a 'region' attribute. Use of this implicit boundary property for picking and navigation operations in Version 4 CGM instances is referred to as the embedded model - a powerful model for newly authored Web documents.

Objects may also be the target of a link. Viewers will move the APS into view and probably scale them to fit into the viewer's rectangle. If the APS contains a 'ViewContext' attribute the rectangle described therein will be moved and scaled to fit into the viewer's rectangle.

2.3.4 WebCGM Defined Group Properties

Explicit properties or attributes of WebCGM groups are encoded as APS Attribute elements. Each APS Attribute has a "type" parameter, which identifies the property or attribute. WebCGM defines the following allowable group APS Attribute types:

WebCGM Edition 1.0 does not allow private attribute types. External private metadata can be associated, by ID, with APSs within a WebCGM. The mechanisms and semantics of such private metadata are beyond the scope of WebCGM Edition 1.0.

2.3.5 Content Model

The detailed normative syntax and semantics are presented later in this profile. The structure and relationships of the intelligence content are illustrated in the following diagrams. In the following, picbody is not a specific WebCGM object type, but rather a convenience to refer to that part of the CGM picture which is between the Begin Picture Body element and the End Picture Element, exclusive. Boxes with heavy borders indicate elements that are decomposed further, and offset boxes indicate attributes associated with an element. Similarly, gdata is not an object type, but rather a catch-all reference to zero or more CGM graphical elements which WebCGM allows, and which are valid at such a position according to the rules of CGM. The gprm attribute associated with gdata represents an entity that associates the graphical primitives to the model. See Figure 1.

Structure Diagram

Structure Diagram

Structure Diagram

2.3.6 Hyperlinking

WebCGM supports bi-directional hyperlinking within individual WebCGM instances, between WebCGM instances and other Web media types.

In-line linking is supported, from WebCGM objects (APS of type 'grobject', 'para', and 'subpara') to WebCGM graphic files, pictures and objects, as well as to text and other media types. WebCGM fully supports linking from other media to WebCGM files, pictures, and objects.

Links from WebCGM objects are realized as 'linkURI' APS Attribute elements contained within the definitions of the objects. The address of the link (the first parameter of the 'linkURI') is any valid URL according to the rules of RFC 1738.

Objects may contain multiple 'linkURI' APS attribute instances, for which case the associated 'LinkTitle' parameter is available to help the user select the destination. The WebCGM profile prescribes a uniform viewer requirement to offer destination choice to the user for such multi-destination cases.

The target of a link, either from within a WebCGM or from another media type (e.g., HTML text), may be a WebCGM instance. This WebCGM profile defines an optional "fragment syntax" for addressing pictures and objects within a WebCGM metafile. A "#" character terminates the base URL, and following the "#" is the WebCGM syntax for picture and object addressing, and for specifying viewer behavior upon execution of the link.

The fragment syntax, in full generality, is:


The <pict-part> is identified by a keyword and has two pieces, the picture locator (either the 'PictureId' string parameter of the CGM, or the picture sequence number), and viewer behavior upon navigating to the picture. The <obj-part> similarly is identified by a keyword and has two pieces, the Id parameter of the object (APS), and viewer behavior.

The syntax is well-defined so that in many common cases, keywords and pieces can be eliminated and defaulted. So, for example, <base-URL>#<string> unambigously identifies the object (APS) whose Id parameter is "<string>" in the first picture of the metafile pointed to by "<base-URL>".

See the normative clauses of Section 3 for complete details and examples.

2.4 Encodings

ISO CGM defines three encodings of the CGM functionality: Binary, Character, and Clear Text encodings for WebCGM files. WebCGM, like other leading industry profiles of CGM, limits the encoding to Binary for the purposes of conforming interchange. It is the Binary encoding which is registered as a MIME type.

2.5 Graphical Content of WebCGM

The graphical content of WebCGM is a subset of the ATA profile, [grex24], and the Model Profile (MP) of the CGM standard. It is chosen to balance the requirements of high expressive power, and simplicity to implement. The WebCGM graphical content comprises a subset of CGM Version 1, 2, and 3 elements which has been recommended by a strong consensus of the CGM Open Consortium, as meeting those criteria and representing state of the art in current CGM technology.

The Profile Pro-forma (PPF), later in this document, gives the content details. Following is a summary at the functional level.

2.5.1 Graphical Primitives

The most obvious aspect of a graphics format is the collection of graphical primitives - those drawing elements which define the geometric and other presentation content of the format. CGM:1992 contains a rich selection of vector graphics primitives, plus fully integrated state-of-the-art compressed tile raster content.

WebCGM Edition 1.0 includes a large subset of these primitives, deemed to be the most useful for Web vector graphics and efficient to implement.

WebCGM Edition 1.0 has excluded some of the graphical drawing power of CGM:1992, to achieve the desired balance of expressive power, implementability, and current commercial implementation support. An upward compatible (superset) WebCGM Edition 2.0 may include many of these, as well as some of the excluded attribute and structuring capabilities.

In CGM:1992 but excluded from WebCGM Edition 1.0 are:

2.5.2 Attributes and Controls

Attribute elements and control elements determine the details of the appearance of graphical primitives.

The following attribute and control features of CGM:1992 have been excluded from WebCGM 1.0. Inclusion of many of these in WebCGM Edition 2.0 is anticipated.

2.5.3 Colour and Transparency

The normal behavior of CGM:1992 viewers is to render later occurring primitives completely opaquely on top of earlier primitives. Three notions of transparency are supported in WebCGM, as described previously. First, a WebCGM picture can be placed with transparent background via the TRANSPARENT parameter of the OBJECT tab; second, the same can be done via an Escape element (currently in registration by ISO) for Polysymbols instanced into a picture; third, per-element and per-pixel translucency (on a continuum between fully opaque and fully transparent) can be defined via an alpha-transparency Escape element specified in the ISO Register of Graphical Items.

The full range of standard CGM:1992 color models is limited in WebCGM Edition 1.0. The [grex24] RGB model is included, as well as the models: RGB-alpha; the colorimetric RGB space of the Web, sRGB; and sRGB-alpha. The latter three are registered in the ISO Register of Graphical Items.

2.5.4 Character Sets and Fonts

Fully international text is supported in WebCGM by:

The default character sets are "ISOLatin1" and "Symbol", as in [grex24] and the ISO CGM Model Profile (MP). A core set of 13 fonts, the same as those in the MP and [grex24], are required in WebCGM implementations.

Up to cover page | Back to Introduction | On to Intelligent Content

Valid HTML 4.0!  Made with CSS