Web CGM Interoperability for industrialstrength CGM graphics John
Web. CGM Interoperability for industrialstrength CGM graphics John C. Gebhardt
Topics • The requirements for a scalable graphics format for the WWW • Why a CGM-based solution? • An introduction to Web. CGM • Examples • Implementation advice • Summary
Scalable Graphics Requirements • • • Open, readily available specification Extensible Widely implemented w/reference code Good interoperability potential Wide range of raster/vector graphic primitives • Flexible text and text font capabilities
Requirements. Con’t • Versatile control of properties transparency, layering, line endings • Page-independent coordinate system • Linking to/from groups of elements • Pickable, active elements or groups • Extractable metadata
Why a CGM-based solution? • CGM is an ISO standard with hundreds of implementations • In 1999, the CGM standard will be available on the internet in HTML format • CGM is used by many industries for 2 D graphics exchange and publishing • CGM Open members and others are united in support of the Web. CGM profile
Why CGM? • Rich set of raster and vector primitives • Versatile structuring capabilities • Compact binary encoding ideal for complex technical graphics • Established profiling mechanism • Established conformance testing capability
Web. CGM • • • Overview File Structure The roles of the picture Groups within pictures Group properties Content model Hyperlinking Graphical Content Encodings
Web. CGM Overview • Submitted to W 3 C on August 19, 1998 • Issued as W 3 C Recommendation on January 21, 1999 • Several editor and viewer/browser implementations under development • Meets “W 3 C Scalable Graphics Requirements” • A profile of ISO/IEC 8632: 1992
Web. CGM File Structure Begin Metafile Descriptor Begin Picture 1 Picture Descriptor Begin Picture Body Begin Metafile Descriptor Picture 2 Picture Properties . . . Picture n End Metafile End Picture Control, Graphical Primitive, and Attribute Elements + Intelligent Groups with Properties Picture body Picture 1 Picture 2 Picture Body . . . End Picture n Metafile Symbol Libraries
How pictures are used • Independent graphical presentation – Opaque background – primitives rendered in order encountered • Overlays to other content – transparent background • Symbol definitions – One or more symbols per library – opaque or transparent background
Groups within pictures • Named, typed collections of graphical primitives with attached properties • Four group types are allowed: – – graphical objects (grobject) layers or levels (layer) paragraphs (para) text within paragraphs (subpara) • Groups can be navigation sources and targets
Web. CGM Architecture Groups (grobject, layer, para, subpara) with properties Symbol Instances Pictures -Overlays Presentations Symbol Definitions
Properties of grobject • • ID - Unique ID (req’d) Name - Name (optional) Link. URI - Link (optional, multiple) Screen. Tip - Descriptive text for interactive display • Region - Optional spatial picking region • View. Context - rectangle to zoom to when pointed to.
Properties of layer • ID - Unique ID (req’d) • Layer. Name - Name of the layer (req’d) • Layer. Desc - Description of the layer (optional)
Properties of para • • ID - Unique ID (req’d) Content - Searchable text (optional) Link. URI - Link (optional, multiple) Screen. Tip - Descriptive text for interactive display (optional) • Region - Spatial picking region (optional) • View. Context - rectangle to zoom to when pointed to. (optional)
Properties of subpara • • ID - Unique ID (req’d) Content - Searchable text (optional) Link. URI - Link (optional, multiple) Screen. Tip - Descriptive text for interactive display (optional) • Region - Spatial picking region (optional) • View. Context - rectangle to zoom to when pointed to. (optional)
Web. CGM Content Model
Web. CGM Content Model
Web. CGM Content Model
Web. CGM Content Model
Web. CGM Content Model
Hyperlinking • Bi-directional • From Web. CGM Object to other objects, pictures, CGMs, HTML files, or any content supported by browser via one or more Link. URI properties • To Web. CGM files, pictures, objects via a URI fragment
Web. CGM Hyperlinks Foo. cgm G 1 P 2 P 3 G 2 P 4 P 5 P 6 P 7 Symbol Instances Foo. cgm#P 3 Foo. cgm#P 4. G 2
Web. CGM Hyperlinks, long form Foo. cgm#pword(<picture_id>, <pic_behavior>). objword(<obj_id>, <obj_behavior>) Where: pword = picid|picseqno objword = id|name and : pic_behavior = _blank |_replace |_self |_top |<target frame name> obj_behavior = view_context |highlight_all
Graphical Content • Subset of the ATA GREXCHANGE profile • Highly expressive • Easily implemented • Includes Version 1, 2, &3 elements
Graphical Primitives • • Line, polyline, polygon set Rectangles, circles, ellipses, arcs, pie slices Graphical text -- restricted, appended Closed figures and compound lines Polysymbols Smooth curves -- Piece-wise cubic Bezier Raster images -- tiled G 4, PNG, jpeg
Attributes and Controls • • Line width, style, color, cap and join Fill with solid color, hatch pattern, bitmap Edge attributes similar to line attributes Line and fill patterns can be passed by name or precisely defined in the metafile • Text font, character set (including Unicode), size, orientation, skew, aspect ratio • Clipping to rectangular regions
Encodings • Clear Text -- for education and testing • Binary -- for production use
What’s not in Web. CGM (but in CGM) • • • Bundled attributes Segments Geometric and Interpolated fills Generalized text paths Protection regions
Implementation Advice • • • Join CGM Open Download free viewer(s) Buy the standard Get a good toolkit Look at the RAL source code Download the CGM test suites from NIST
Summary • Web. CGM is an excellent method for publishing intelligent hybrid 2 D graphics on the WWW • It promises to deliver exceptional interoperability between editing tools and viewer/browsers • It will unleash a flood of new technical graphics publishing applications
- Slides: 31