no <defs> support?

Discuss SVG code, accessible via the XML Editor.
tfit
Posts: 12
Joined: Wed Nov 05, 2008 5:57 am

no <defs> support?

Postby tfit » Fri Nov 07, 2008 4:59 am

I hope this problem will not be again mines only :D .
I found a few svg's on http://apike.ca/prog_svg_transform.html"codebox">

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
    "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"
         width="100" height="100"
         viewBox="0 0 200 200"  >
   
   <!-- Matthew Bystedt http://pike.port5.com 2003 -->
   
   <!-- Pattern Definition -->
   <defs>
      <pattern id="checkerPattern" patternUnits="userSpaceOnUse"
            x="0" y="0" width="20" height="20"
            viewBox="0 0 10 10" >
            
         <rect x="0" y="0" width="5" height="5" fill="lightblue" />
         <rect x="5" y="5" width="5" height="5" fill="lightblue" />
      </pattern>
   </defs>

   <!-- Background -->
   <rect x="0" y="0" width="100%" height="100%" fill="url(#checkerPattern)" />

   <!-- Rectangle Example -->
    <g transform="scale(5) translate(15, 15) rotate(20) skewX(20) skewY(5)" >
        <rect x="10" y="10" width="5" height="5" fill="firebrick" />
        <circle r="10" fill="seagreen" stroke="blue" />
        <rect x="5" y="5" width="12" height="2" fill="gray" stroke="silver" />
    </g>   
</svg>