GrArea

Name

GrArea -- Draw a multiple-bit-per-pixel bitmap

Synopsis

void GrArea (
  GR_DRAW_ID  id,
  GR_GC_ID    gc,
  GR_COORD    x,
  GR_COORD    y,
  GR_SIZE     width,
  GR_SIZE     height,
  void *      pixels,
  int         pixtype
);

Parameters

id

The ID of the window or other drawable area.

gc

The graphics context to use when drawing the bitmap.

x, y

The location in the drawable area to draw the upper left corner of bitmap.

widht, height

The dimensions of the bitmap in pixels.

pixels

A pointer to a packed pixel bitmap.

pixtype

One of the following acceptable bitmap types:

TypeBitmap Description
MWPF_RGBPacked 32-bit RGB
MWPF_PIXELVALPacked PIXELVAL
MWPF_PALETTEPacked 8 bits, 1, 4, or 8 pallette index
MWPF_TRUECOLOR0888Packed 32 bits 8/8/8 truecolor
MWPF_TRUECOLOR888Packed 24 bits 8/8/8 truecolor
MWPF_TRUECOLER565Packed 16 bits 5/6/5 truecolor
MWPF_TRUECOLOR332Packed 8 bits 3/3/2 truecolor

Description

The GrArea function draws a bitmap at the (x, y) coordinates of the drawable area using the gc graphics context. Each pixel in the drawable area gets set to the corresponding color value from the bitmap. The pixtype parameter describes the bit depth of the bitmap.

If you set the usebackround mode for the graphics context, then the GrArea function draws pixels with color values equal to the graphics context background color; otherwise, the function does not draw pixels with color values equal to the background color of the graphics context.