- w, h = rect:size()
- w = rect:width()
- h = rect:height()
SYNOPSIS
DESCRIPTION
A rectangle is a simple data structure containing a coordinate pair and a size pair.
These functions allow to query the size of the specified rectangle rect.
RETURN VALUE
The function rect:size() returns two numbers, the width and height of the
rectangle. The functions rect:width() and rect:height()
return the width and height of the rectangle as a single value each.
ERRORS
Raises an error if rect is not a rectangle.
EXAMPLE
>
>
r = gfx.rect(10,20,30,40)
print (r:width(), r:height(), r:size())
30 40 30 40