SVG g要素

オブジェクトをグループ化することができます。g要素に適用された指定は、すべて子要素に継承されます。

円を描いたサンプルプログラム

<?xml version="1.0" encoding="UTF-8"?>
<pxd paper-type="A4" orientation="portrait">
<page>
<svgx="0" y="0" width="21cm" height="29.7cm" viewBox="0 0 2100 2970">
<g  stroke="green" fill="white" stroke-width="50"  r="150" cy="250">
 <circle cx="250" />
 <circle cx="400" />
 <circle cx="550" />
 <circle cx="700"/>
</g>
</svg>
</page>
</pxd>
上部へスクロール