Home  Contents

gcx:pixmap

Graphics Core4 Lua Commands

SYNOPSIS

px = gcx:pixmap([w, h, [withalpha]])

DESCRIPTION

Returns a new off-screen graphics context with size w x h. The pixmap has has the same internal representation (bit depth, color space, orientation, ...) as gcx. The optional parameters w and h specify the width and height of the new bitmap. If the values are not present or nil, they default to the size of the parent bitmap.

The optional boolean parameter withalpha adds an alpha channel to the bitmap. This allows transparency and alpha blending together with gcx:blitMode() and gcx:alphaMode().

RETURN VALUE

A graphics context handle.

ERRORS

Raises an error if gcx is not a graphics context.

EXAMPLE

px = gcx:pixmap(320, 240)

SEE ALSO