XML/SVG/rotate

Материал из Web эксперт
Перейти к: навигация, поиск

Using the SVG rotate Function with Checkerboards

   <source lang="xml">

<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"

"http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">

<svg width="800" height="500">

 <defs>
   <pattern id="checkerPattern" width="80" height="80"
     patternUnits="userSpaceOnUse">
     <rect fill="red" x="0" y="0" width="40" height="40" />
     <rect fill="blue" x="0" y="40" width="40" height="40" />
   </pattern>
 </defs>
 <g transform="translate(300,50)">
   <g transform="rotate(30)">
     <rect fill="url(#checkerPattern)" style="stroke:white" x="0"
       y="0" width="320" height="320" />
   </g>
 </g>

</svg>

</source>