drawImageEx()
Purpose
Draw a previously loaded image file (extended)
Description
Draws an image file at the specified location on the screen. The image can be scaled rotated and tinted
Syntax
drawImageEx( handle, location, rotation, scale, tint, origin )
Arguments
handle variable which stores the desired image file
location vector screen position to start drawing the image { x, y }
rotation angle to rotate image in default units
scale vector containing the horizontal and vertical scale factors { x, y }
tint colour name or RGB values { red, green, blue, opacity } between 0 and 1
origin origin point of the screen( default is { 0, 0 } which is the top left)
Example
image = loadImage( "Colin Brown/Dice", false )
location = { gWidth() / 2, gHeight() / 2 }
rotation = 0
scale = { 0.5, 0.5 }
tint = red
origin = { 0, 0 }
loop
clear()
rotation = rotation + 1
drawImageEx( image, location, rotation, scale, tint, origin )
update()
repeat
Associated Commands
clear(), createImage(), drawImage(), drawQuad(), drawSheet(), loadImage(), update(), uploadImage()