@Grab(group='com.jhlabs', module='filters', version='2.0.235') import java.awt.* import java.awt.image.* import java.io.* import javax.imageio.* import com.jhlabs.composite.* import com.jhlabs.image.* // 織物風の画像を生成する def img = new BufferedImage( 200, 200, BufferedImage.TYPE_INT_ARGB ) def ff = new FillFilter((int)0xff7799dd) img = ff.filter(img, null) def wf = new WeaveFilter() img = wf.filter(img, null) ImageIO.write(img, "png", new File("drawweave.png"))
出力画像
動作環境
groovy 1.8.6, JDK7 update4
No comments:
Post a Comment