SVG basic shapes

previoustopnext

Shapes in SVG are syntactic sugar for the paths of common geometric shapes

 <?xml version="1.0"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG August 1999//EN"
 "http://www.w3.org/Graphics/SVG/SVG-19990812.dtd">
 <svg width="4in" height="3in">
     <rect x="20" y="30" width="50" height="90"/>
     <ellipse cx="90" cy="80" rx="45" ry="65/>
     <polygon points="20,20 50,100 200,80 70,300"/>
     <path d="M20,20 L50,100 200,80 70,300z"/>
 </svg>

Chris Lilley

W3C