import griffon.builder.gfx.render.*
def gr = new GfxRenderer()
gr.renderToFile("sample1421a.png", 100, 100){
antialias("on")
rect( x:10, y:10, width:80, height:80,
arcWidth: 20, arcHeight:20,
fill: color("#c8c0c0"),
borderColor: color("#808080"),
borderWidth: 2
)
}
出力画像(sample1421a.png)
![GfxBuilderで描画した角丸四角](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1rS1OpVW6S6lrC_qPclB1iCG2doy3svThUsdMd3SmPgXeMZyPg9NBaIqzRLS5KrIX1iqbuWE4O3t41TE6ObfFPD-1OsJrkh5uZ-BdorCqemTe-CsUxSjseHqWBAdGvOmhyphenhyphenhHH/s320/sample1421a.png)
動作環境
Groovy1.6.5, JDK6 Update16
No comments:
Post a Comment