XML/SVG/circle

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

Three circles

<svg>
  <defs>
    <circle id="circle"  cx="20" cy="25"  r="10"/>
  </defs>
  
  <use xlink:href="#circle" style="fill: orange; stroke: black;"/>
  <use xlink:href="#circle" style="fill: mistyrose; stroke: black;" transform="translate(75, -12.5) scale(1.5)"/>
  <use xlink:href="#circle" style="fill: palegoldenrod; stroke: black;" transform="translate(150, -25) scale(2.0)"/>
</svg>



Using an SVG circle Element to Render Circles

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
  "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="100%" height="100%">
  <g transform="translate(200,100)">
    <circle cx="100" cy="100" r="50" fill="red" stroke="blue"
      stroke-width="10" />
  </g>
</svg>