CANVAS:draw_image(name, attrs)
Draw an image within the canvas directed by the user specified properties.
Parameters:
name |
The project relative name of the image, same as used in the Image |
||||||||||||||
attrs |
A table of properties containing information about how to draw the image. This table can contain the following optional keys:
|
Example:
-- Draw an image scaled to the canvas size function DrawImage(name) local canvas = gre.get_canvas(name) local size = canvas:get_dimensions() local attrs = {} attrs.w = size.width attrs.h = size.height canvas:draw_image("images/logo.png", attrs) end