ellipse
<pxd> <page> <svg> <ellipse>
属性 | 値 | 必要 | 意味 |
---|---|---|---|
cx | 数値 例:cx="21cm" |
円の中心の横座標を指定します。 | |
cy | 数値 例:cy="29.7cm" |
円の中心の縦座標を指定します。 | |
rx | 数値 例:rx="1cm" |
○ | 円の半径 |
ry | 数値 例:ry="1cm" |
○ | 円の半径 |
stroke-width | 数値 例:stroke-width="3mm" |
線の太さを指定します。 | |
stroke | 色 例:red 例:#FF11BB 例:rgb(255,255,0) 例:none |
線の色を指定します。 | |
fill | strokeの場合と同じ | 塗りつぶし色を指定します。 | |
fill-opacity | 数値0(透明)〜1(不透明) 例:fill-opacity="0.5" |
塗りつぶしの透明度を指定します。 | |
stroke-opacity | 数値0(透明)〜1(不透明) 例:stroke-opacity="0.5" |
線の透明度を指定します。 | |
opacity | 数値0(透明)〜1(不透明) 例:opacity="0.5" |
全体の透明度を指定します。 | |
stroke-dasharray | 数値(カンマ区切り) 例:stroke-dasharray="10,20" |
線を点線にします。 | |
class | 自由 例:title |
スタイルを参照する。下記に簡単な例を示す。
<style type="text/css"><![CDATA[ .blackCircle { rx:50; ry:100; fill:black; } ]]></style> <ellipse x="500" y="120" class="blackCircle"/> |
サンプル
<?xml version="1.0" encoding="Shift_JIS"?> <pxd title="サンプル(楕円)" xmlns:pxd="http://www.pxdoc.com/"> <page> <svg width="12cm" height="4cm" viewBox="0 0 1200 400" xmlns="http://www.w3.org/2000/svg" version="1.1"> <rect x="1" y="1" width="1198" height="398" fill="none" stroke="blue" stroke-width="2" /> <g transform="translate(300 200)"> <ellipse rx="250" ry="100" fill="red" /> </g> <ellipse transform="translate(900 200) rotate(-30)" rx="250" ry="100" fill="none" stroke="blue" stroke-width="20" /> </svg> </page> </pxd> |