Witten
Bainbridge
Nichols
HOME HELP PREFERENCES SEARCHFIGURESTABLES

SVG line types

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
      "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 3 <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
 4  
 5   <style type="text/css"><![CDATA[
 6         .plain-line {stroke: black; stroke-width:2; fill:white;} ]]>
 7   </style>
 8 
 9   <g transform="scale(2.0)">
10     <g transform="translate(10,10)">
11 
12       <line x1="0" y1="0" x2="80" y2="10" class="plain-line"/>
13       <line x1="100" y1="10" x2="180" y2="10" class="plain-line"/>
14       <line x1="200" y1="10" x2="280" y2="10" stroke="black" stroke-width="10" 
            stroke-linecap="round"/>
15       
16       <g transform="translate(0,40)">
17         <polyline points="0,30 20,0 60,0 80,30" class="plain-line"/>
18       </g>
19      
20       <g transform="translate(100,40)">    
21         <path d="M0,30 L20,0 60,0 80,30" class="plain-line"/>
22       </g>
23      
24       <g transform="translate(200,40)">
25         <path d="M0,30 C20,0 60,0 80,30" class="plain-line"/>
26       </g>
27       
28     </g>
29   </g>
30 
31 </svg>

Figure 5.18b: SVG line types; Underlying XML