Library globals

Class globals . canvas . api . image . Image

View source

-------------------------------------------------------------------------------
canvas.Image
-------------------------------------------------------------------------------
Class for an image element on a canvas

Functions

new

setFile

Set image file to be used @param file Path to file or canvas (Use canvas://... for canvas, eg. canvas://by-index/texture[0])

setSize

Set size of image element @param width @param height - or - @param size ([width, height])

setSourceRect

Set rectangular region of source image to be used @param left Rectangle minimum x coordinate @param top Rectangle minimum y coordinate @param right Rectangle maximum x coordinate @param bottom Rectangle maximum y coordinate @param normalized Whether to use normalized ([0,1]) or image ([0, image_width]/[0, image_height]) coordinates