import groovy.swing.j2d.*
w=200
h=200
gr = new GraphicsRenderer()
gr.renderToFile("sample1009a.png", w, h){
antialias 'on'
rect( x: 0, y: 0, width: w, height: h,
borderColor: no){
filters {
fractalFlame()
}
}
}
gr.renderToFile("sample1009b.png", w, h){
antialias 'on'
rect( x: 0, y: 0, width: w, height: h,
borderColor: no){
filters {
fractalFlame(ifs: new org.jvnet.substance.watermarkpack.flamefractal.Vortex())
}
}
}
出力画像(sample1009a.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinehi8jXWtoe_218Kyz8ElNYRADhtfL6gtdGH4jfHkmKXC2uCdmd8FDmMw-2gL3tjnONFxWeDnKTZj0uughbiVVQAVQvOev6bsRMTv5Tonn7NWyFUraDuvwB2VgdxpknA8eKwr/s320/sample1009a.png)
出力画像(sample1009b.png)
![groovyで生成したフラクタルフレーム画像](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbMsHYV4Vbe5vqUcglGeLNXF-JgcwpCf3JVf94B761yj4qNbt1BUKxEDuczVTkyAySueuGR5fkciiXuokk0byvfVqdXyYh_SLoEKbaO4iD-nPag3h10NRzhr1eOwh-mt_Utqiz/s320/sample1009b.png)
動作環境
Groovy1.6.0, JDK1.6 Update12
No comments:
Post a Comment