- w, h = gcx:size()
- w = gcx:width()
- h = gcx:height()
- bpp = gcx:bpp()
SYNOPSIS
DESCRIPTION
Allows to query the size (in pixels) and bit depth of the specified graphics context gcx.
RETURN VALUE
The function gcx:size() returns two numbers, the width and height of the graphics context. The functions gcx:width() and gcx:height() return the width and height of the buffer as a single value each. The function gcx:bpp() returns the number of bits used per pixel.
The width and height represent the logical display size, after applying the orientation setting. Specifically, at orientations 90° or 270°, the width and height are swapped with regard to the physical display orientation.
ERRORS
Raises an error if gcx is not a graphics context.
EXAMPLE
>
>
fb = gfx.open()
print (fb:width(), fb:height(), fb:size(), fb:bpp())
480 272 480 272 24