2007年8月1日水曜日

ZK: SVGを使う


ZKでSVGを使用するにはhtmlコンポーネントの中でembedタグ、またはobjectタグを使用する方法またはiframeタグを使う方法がある。

Scalable Vector Graphics(SVG、スケーラブル ベクター グラフィックスは、XMLによって記述されたベクターグラフィック言語のこと、或いは、SVGで記述された画像フォーマットのこと。W3Cでオープン標準として勧告されている。...だそうです。





use-svg.zul

<window title="Test SVG" border="normal" width="500px">
<html>
<attribute name="content">
<![CDATA[
<embed src="rectangle.svg" width="300" height="100"
type="image/svg+xml"
pluginspage="http://www.adobe.com/svg/viewer/install/"> </embed>
]]>
</attribute>
</html>
<iframe src="circle1.svg"/>
</window>


rectangle.svg

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">

<circle cx="100" cy="50" r="40" stroke="black"
stroke-width="2" fill="red"/>

</svg>

0 件のコメント: