Home Contents | # gfx.size | Graphics | Core4 Lua Commands

## SYNOPSIS

1. w, h = gfx.size()
2. w = gfx.width()
3. h = gfx.height()

## DESCRIPTION

Allows to query the size (in pixels) of the hardware framebuffer.

## RETURN VALUE

The function gfx.size() returns two numbers, the width and height of the hardware framebuffer. The functions gfx.width() and gfx.height() return the width and height of the framebuffer as a single value each.

## ERRORS

If no hardware framebuffer exists, all returned values are zero.

## EXAMPLE

>
print (gfx.width(), gfx.height(), gfx.size())
480 272 480 272

## SEE ALSO

gcx:size, gcx:height, gcx:width, gcx:resize