3.3 Scalable Vector Graphics (SVG)

3.3.1 Background

3.3.2 Initialization
<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"  
  "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">  
<svg xmlns="http://www.w3.org/2000/svg" >  
   <title> ... </title>  
   <desc> ... </desc>  
   .....  
</svg>

3.3.3 Basic Shapes

Basic Shapes
  <line     x1="..." y1="..."     x2="..."     y2="..." />  
  <rect      x="..."  y="..."  width="..." height="..." />  
  <circle   cx="..." cy="..."      r="..."              />  
  <ellipse  cx="..." cy="..."     rx="..."     ry="..." />  
  <polyline points="x1,y1  ........." />  
  <polygon  points="x1,y1  ........." />

[example]

Paths
  <path d="..." pathLength = "..." />

Paths represent the outline ‘d’ of a shape defined in terms of points and the following directives.

Lowercase characters request relative addresses instead of absolute ones.

[example]

Painting

Painting of shapes is determined by the colors supplied to the ‘fill’ and ‘stroke’ properties.

[example]

3.3.4 Text

[example]

3.3.5 Code Sharing

Cross Referencing
<....  id="..." ...> ... </...>  
<use x="..." y="..." width="..." height="..." xlink:href="..." />

[example]

Grouping

<g ...>...</g>

[example]

Inhibited Rendering

<defs>...</defs>

Elements that are descendants of a ’defs’ are not rendered in place.

[example]

Templates

<symbol ...>...</symbol>

The symbols are defined within an independent canvas. The overflow parameters ask for the whole symbol, not only a quarter of it around the origin (0,0).

[example]

3.3.6 Coordinate Systems

Transformations on Coordinate System

transform="..."

[example]

3.3.7 Special Effects

Clipping
<clipPath id="...">...</clipPath>  
<... clip-path="url(#...)" >

[example]

Filtering

Create blurs, shadows, lighting effects, etc.

[example]

Animation

[example]

Interactivity

[example]