Examples from Chapter 31 of The XML Bible, Gold Edition: Scalable Vector Graphics
Listing 31-1: An SVG document that represents a red circle with a blue outline
Listing 31-2: An HTML document in which Listing 31-1 is included
Listing 31-3: An HTML document in which Listing 31-1 is embedded
Listing 31-4: A partial checkerboard made up out of rects
Listing 31-5: A pattern of nine rounded rects
Listing 31-6: An SVG Bull's-eye
Listing 31-7: Two ellipses perpendicular to each other
Listing 31-8: A right triangle formed from three lines
Listing 31-9: Three polygons
Listing 31-10: Tic-tac-toe
Listing 31-11: A pie formed by eight arc paths
Listing 31-12: Bézier curves
Listing 31-13: Four text elements, one for each line of a poem
Listing 31-14: Text on a path
Listing 31-15: Placing a JPEG image in an SVG picture
Listing 31-16: Using CSS properties to set the size of an embedded SVG picture
Listing 31-17: A circle that doesn't fit in its viewport
Listing 31-18: Using a viewBox attribute to adjust the local coordinate system
Listing 31-19: Using a viewBox attribute to adjust the local coordinate system
Listing 31-20: Non-uniform coordinate systems squeeze shapes if the aspect ratio isn't preserved
Listing 31-22: A pie formed by eight rotated copies of one wedge
Listing 31-23: An exploded pie
Listing 31-24: Scaled pie
Listing 31-25: Skewed text
Listing 31-26: Nine circles linked to different sites
Listing 31-27: RDF and XHTML metadata embedded in an SVG document
Copyright 2001
Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified at August 14, 2001