Draws an image. An Image operation can work as a wrapper for another image operation, in the same way that paint works. It also accepts transformations.

Properties

Property

Default

Notes

x

0

 

y

0

 

image

 

must be a java.awt.Image, an image or shape operation

classpath

 

String

url

 

URL or String

file

 

File or String

opacity

1

controls how much of the image is visible, value must be in the range [0..1]

asImage

false

if true will skip drawing the image right away, useful for texture painting

You must specify ate least any of [image,classpath,url,file]

Example

image( url: 'http://groovy.codehaus.org/download/attachments/1866/groovydukemed.jpg' )