CANVAS:get_dimensions
CANVAS:get_dimensions()
Return the width and height of a canvas object.
Returns
| Type | Description |
|---|---|
#table | A table containing two fields width and height |
Example
function PrintCanvasSize(name)
local canvas = gre.get_canvas(name)
local size = canvas:get_dimensions()
print(string.format("Canvas is %d x %d", size.width, size.height));
end