JAVAC.JP
HOSHI TETSUYA 星鉄矢
2005/07/25
hossy@javac.jp
http://www.javac.jp
Google
WWW を検索 WWW.JAVAC.JP を検索

5-8 課題(5)

課題(5)
以下のGraphData.xmlを読み込み、グラフを描画せよ。ノードのimage属性に従って、対応するイメージをノードの画像にする。サイズは50x50Pixels。ノードをドラッグ可能にせよ。
<?xml version="1.0" encoding="UTF-8" ?>
<graph>
    <pointlist>
        <point id="0" x="-100" y="-100" image="img0" />
        <point id="1" x="100"  y="-100" image="img1" />
        <point id="2" x="-100" y="100"  image="img2" />
        <point id="3" x="100"  y="100"  image="img3" />
        <point id="4" x="0"    y="0"    image="img4" />
    </pointlist>
    <linelist>
        <line id="0" point1="0" point2="1" />
        <line id="1" point1="1" point2="4" />
        <line id="2" point1="4" point2="0" />
        <line id="3" point1="0" point2="2" />
        <line id="4" point1="0" point2="3" />
    </linelist>
    <imagelist>
        <image id="img0" url="http://star.hossy.net/download/flashlab/graph/2-2/jpgs/000.jpg" />
        <image id="img1" url="http://star.hossy.net/download/flashlab/graph/2-2/jpgs/001.jpg" />
        <image id="img2" url="http://star.hossy.net/download/flashlab/graph/2-2/jpgs/002.jpg" />
        <image id="img3" url="http://star.hossy.net/download/flashlab/graph/2-2/jpgs/003.jpg" />
        <image id="img4" url="http://star.hossy.net/download/flashlab/graph/2-2/jpgs/004.jpg" />
    </linelist>
</graph>



BACKTOPNEXT




All Contents Copyright (C) 2005 HOSHI Tetsuya
Home