Skip to main content
Version: 9.0.2

CANVAS:get_dimensions

CANVAS:get_dimensions()

Return the width and height of a canvas object.

Returns

TypeDescription
#tableA 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