import java.awt.*
import groovy.swing.j2d.swf.*
// groovy 1.6.0, JDK6 update12
def gr = new SWFRenderer()
gr.renderToFile("sample1041a.swf", 200, 200){
 rect( x:10, y:10, width:180, height:180,
   arcWidth: 20, arcHeight:20,
   fill: new Color(0xbb, 0xdd, 0xff, 0xff),
   borderColor: new Color(0x11, 0x33, 0x77, 0xff) )
}
出力画像(sample1041a.swf)

関連項目
groovyで角丸四角を描画する (GraphicsRendererでの同様の処理)
 
No comments:
Post a Comment