import java.awt.*
import groovy.swing.j2d.swf.*
// groovy 1.6.0, JDK6 update12
def gr = new SWFRenderer()
gr.renderToFile("sample1040a.swf", 200, 200){
ellipse( cx:100, cy:100, radiusx:80, radiusy:40,
fill: new Color(0xbb, 0xdd, 0xff, 0xff),
borderColor: new Color(0x11, 0x33, 0x77, 0xff) )
}
出力SWF(sample1040a.swf)
![SWFRendererで描画した楕円](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5zI2U-ebcDzvA1P3rHftt2p7NlpQ7ZFokrPyJ_hmSrQJjjK_XVdsgAO43Zit9Gml0QQnlH3NVRBNm1MAgpYOB7YsyUpt_n9-Ef3t45ofRSq96WTZuuiBo4Dvu-rsJ6EML2LW4fA/s320/sample1040a.png)
動作環境
Groovy1.6.0, JDK1.6 Update12
No comments:
Post a Comment