import griffon.builder.gfx.render.*
def gr = new GfxRenderer()
gr.renderToFile("sample1422a.png", 200, 200){
antialias("on")
regularPolygon( cx:100, cy:100, radius:80, sides:5,
fill: color("#c8c0c0"),
borderColor: color("#808080"),
borderWidth: 2
)
}
出力画像(sample1422a.png)
![GfxBuilderで描画した正多角形](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Et_8C5UA_g2ZJTTGvTwEszFtm0QrAjs8XD6e_xt9QvJksv2qbNjI1USpjh_DR1a2LK0bB7EmwBsVpR27SnDsiOWz9t68B7XJCG4_0VoDSt9N3WnxrHvhuhbLyjOXAkzbK5DW/s320/sample1422a.png)
動作環境
Groovy1.6.5, JDK6 Update16
No comments:
Post a Comment