import groovy.swing.j2d.svg.*
gr = new SVGRenderer()
gr.renderToFile("sample989a.svg", 200, 200){
background(color: color("white"))
rect(x:0, y:0, width: 200,
height: 200, borderColor:no){
texturePaint(x: 0, y: 0, file: "flower1.png" )
}
}
元画像(flower1.png)

出力SVG(sample989a.svg)をfirefoxで表示させた画面

動作環境
Groovy1.6.0, JDK1.6 Update12
No comments:
Post a Comment