- gcx:box(x, y, w, h [, rgb])
- gcx:box(rect [, rgb])
- gcx:fill(x, y, w, h [, rgb])
- gcx:fill(rect [, rgb])
SYNOPSIS
DESCRIPTION
Draws a rectangle at x, y of size w, h using the specified color rgb. If color is not given, uses the stored foreground color.
The function gcx:box draws an outline of one pixel, while gcx:fill fills the whole rectangle.
ERRORS
Raises an error if gcx is not a graphics context.
EXAMPLE
Fills a yellow box:
>
gcx:fill(gcx:width()/3, gcx:height()/3, gcx:width()/2, gcx:height()/2, 0xFFFF00)