Using the SVG scale Function with Checkerboards : transform « SVG « XML






Using the SVG scale Function with Checkerboards

<?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="40" y="0" width="40" height="40" />

      <rect fill="blue" x="0" y="40" width="40" height="40" />

      <rect fill="red" x="40" y="40" width="40" height="40" />
    </pattern>
  </defs>

  <g transform="translate(50,50)">
    <g transform="scale(.5)">
      <rect fill="url(#checkerPattern)" style="stroke:white" x="0"
        y="0" width="320" height="320" />
    </g>
  </g>
</svg>

 








Related examples in the same category

1.transform the coordinate
2.Using Multiple SVG scale Elements
3.Transform circle