import groovy.swing.j2d.svg.*
gr = new SVGRenderer()
gr.renderToFile("sample992a.svg", 200, 200){
butterflyShape( x: 0, y: 0, width: 200, height: 200,
fill: color("#bbddff"),
borderColor: color("#103080"),
borderWidth: 2
){
transformations{
rotate(angle:45, x:100, y:100)
}
}
}
出力SVG(sample992a.svg)をPNGでレンダリングした画像

動作環境
Groovy1.6.0, JDK1.6 Update12
関連項目
groovyで図形を回転させる (GraphicsRendererでの同様の処理)
No comments:
Post a Comment