= GWTでSVGを使う = == lib-gwt-svg == [[lib-gwt-svg|lib-gwt-svgへ]] == raphaelgwt == raphaelgwtというライブラリを使う。 ※raphaelgwtはraphaelのラッパだが、raphaelはSVGではない。[[SVG]]を参照のこと * [[http://code.google.com/p/raphaelgwt/|raphaelgwt本家]] 使い方がよくわからないが、以下のようにすればとりあえず描画ができる。 * ライブラリをダウンロードしてパスを通す。 * gwt.xmlファイルに「 」を記述する。 * 以下のようなJavaファイルを作成する。 {{{ package com.mycompany.project.client; import com.hydro4ge.raphaelgwt.client.Raphael; public class SampleView extends Raphael { public SampleView(int width, int height) { super(width, height); } @Override public void onLoad(){ final Circle c = this.new Circle(25, 25, 50); c.attr("cursor","pointer"); c.attr("stroke-width","3").attr("stroke-dasharray","--"); c.attr("fill", "#00BFFF"); } } }}} * 上記SampleViewをパレットに登録してデザイン画面に入れる。