import groovy.swing.j2d.svg.*
gr = new SVGRenderer()
gr.renderToFile("sample954a.svg", 200, 200){
rect( x:10, y:10, width:180, height:180,
fill: color("#bbddff"),
borderColor: color("#103080"),
borderWidth: 2
)
}
出力SVG(sample954a.svg)をPNGにレンダリングした画像

動作環境
Groovy1.6.0, JDK1.6 Update12
関連項目
groovyで四角を描画する (GraphicsRendererによる同様の処理)
No comments:
Post a Comment