CANVAS:get dimensions

CANVAS:get_dimensions()

Return the width and height of a canvas object.

Returns:

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
Was this article helpful?
0 out of 0 found this helpful