Home Contents | # gcx:window | Graphics | Core4 Lua Commands

## SYNOPSIS

w = gcx:window(x, y, w, h)

## DESCRIPTION

Returns a new context that is a window of the passed context gcx. Note that this is a raw, most basic window. There is no sophisticated clipping mechanism implemeted yet. It is just a rectangle that shares it's memory with the referenced context gcx.
If x or y is nil, it's value is centered into the referenced context gcx.

## RETURN VALUE

A graphics context handle.

## ERRORS

Raises an error if gcx is not a graphics context.

## EXAMPLE

>
w = gcx:window(16, 16, 320, 32)

## SEE ALSO

gfx.open, gcx:close, gcx:load, gcx:pixmap