import groovy.swing.j2d.*
def gr = new GraphicsRenderer()
imgb = gr.render(200, 200){
antialias("on")
butterflyShape( x: 10, y: 10, width: 180, height: 180,
fill: color("#bbddff"),
borderColor: color("#103080"),
borderWidth: 2
)
}
gr.renderToFile("sample946a.png", 200, 200){
antialias("on")
rect( x: 0, y: 0, width: 200, height: 200,
borderColor: no){
texturePaint(x: 0, y: 0, image: imgb )
filters {
gaussianBlur(radius:10)
}
}
}
出力画像(sample946a.png)
動作環境
Groovy1.6.0, JDK1.6 Update12
関連項目
groovyで画像をぼかす
No comments:
Post a Comment