WebCGM and SVG: A Comparison
ABSTRACT
WebCGM and SVG have been discussed for some time as the upcoming standards for vector graphics on the Web. Now that more and more products have become available for these formats, users want to know about the differences between them. This session compares the formats technically and shows the benefits of either format. It also serves as an introduction to the graphics track, which will provide more information about WebCGM and SVG.
Addressing the Need
-
CGM Open
-
SVG Working Group of W3C
The Requirements
-
Scalable
-
Efficient
-
Revisable
-
Object-addressable
-
Integratable w/ other Web content
WebCGM
-
Cooperation of CGM Open and W3C (World Wide Web Consortium)
-
Technical work was conducted by CGM specialists
-
Based on ATA profile GREXCHANGE 2.4
-
Changes and extensions for web usage
-
Additional definition of meta data
WebCGM Overview
-
Rich format for raster and vector elements
-
Fully developed and structured format
-
Compact binary encoding for complex technical graphics
-
Increasing support by software developers and end users
-
Supported by CGM Open
-
Conformance and test procedures
Status of WebCGM
-
W3C recommendation since January 1999
-
First interoperability demo at the XML show in Granada in April 1999
-
First products have been released
SVG
-
Scalable Vector Graphics
-
Work group of W3C
SVG Overview
-
XML tagset, stylable (by style sheets), integrated in and dependent on various other XML standards
-
Creative graphics and design
-
Integrated, dynamic and animated web sites
-
SVG Test Suite available
Status SVG
-
Candidate Recommendation
-
Final version in January 2001
-
Support by various software vendors already announced
-
First products released
WebCGM and SVG - Common Geometry
-
Lines, polylines, polygons
-
Rectangles, circles, ellipses, arcs
-
Graphical text
-
Closed figures and compound lines
-
Polysymbols/Markers
-
Smooth curves -- Piece-wise Bezier
-
Raster images -- PNG, jpeg
-
Clipping
WebCGM and SVG: Simple geometry
SVG:
<svg width="400" height="400"> <g style="fill:none; stroke:green"> <line x1="100" y1="300" x2="300" y2="100" style="stroke-width:5" /> </g> </svg>
CGM (text encoded):
BEGMF 'sample.cgm '; ... BEGPIC 'Picture 1'; VDCEXT 0,400 400,0; ... BEGPICBODY; ... LINECOLR 5;LINEWIDTH 0.5;LINETYPE 1; LINE 100,300 300,100; ENDPIC; ENDMF;
WebCGM and SVG: Text
-
All text is Unicode
-
graphical text
-
non-graphical text, e.g. screentips
-
font descriptors
-
CGM: basic 13 PostScript fonts
-
other fonts with font properties allowed
-
SVG: no predefined font, can define own fonts
-
WebCGM and SVG: Hyperlinking
-
Simple hyperlinks
BEGAPS 'myID1' 'grobject' STLIST; APSATTR 'name' "14 1 'myObj1'"; APSATTR 'linkuri' "14 3 'sample.cgm#id(myObj)' 'Click to display obj1' ''"; BEGAPSBODY; POLYGON 30,50 70,50 70,15 30,15 30,50; ENDAPS; <g> <desc>'Click to display obj1'</desc> <a id='s12-1myObj1' xlink:href='sample.svg#xpointer(id(myObj))'> <polygon points='30,50 70,50 70,15 30,15 30,50'/> </a> </g>
-
Link to view context
WebCGM and SVG: Other Links
-
Link to symbols
-
Link to gradients, filters, fonts, animation in SVG
WebCGM & SVG compared
-
WebCGM:
-
Profile of an established ISO standard
-
Communication and exchange in existing customer networks
-
Binary encoding, completely defined, "self contained"
-
No proprietary data
-
-
SVG:
-
Complete new concept, from "scratch"
-
Creative graphics and design
-
Integrated, dynamic, animated web pages
-
xml-coded, stylable, dependent on other files,
e.g. style sheets
-
Inclusion of any proprietary extensions possible in a different namespace
-
Comparison: WebCGM & SVG
-
Overlap in functionality
-
WebCGM => SVG, conversion without losses
-
SVG => WebCGM, potentially very lossy
-
Do SVG and WebCGM compete?
No.
Why not?
-
SVG is suitable for high quality, creative graphics
-
color requirements
-
text / font requirements
-
animation
-
filter effects
-
-
WebCGM is suitable for technical graphics with long life cycle
-
complexity / size requirements
-
re-authoring capabilities
-
interoperability requirements (lots of data exchange)
-
Compliance with industry standards (ATA, CALS)
-
So what?
-
For a lot of files, SVG will be the better solution.
-
For a lot of files, WebCGM will be the better solution
-
Expectations:
-
Both formats will coexist and complement each other
-
Things to watch out for
-
Before you convert all of your files to SVG and/or WebCGM:
-
wait for final implementations
-
watch out for restrictions when using files in current web browsers
-


