GrArea()

Name

GrArea() -- Draw a pixel array

Synopsis

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

Description

This function draws a bitmap on the specified drawable. The bitmap is drawn at the location (x,y) relative to the drawable.

The bitmap image is drawn using the specified graphics context. If the graphis context variable usebackground is set then pixels in the bitmap that match color with the graphics context's background color are not drawn. This way you can have transparent sections in the bitmap image.

Note

Color conversion is only performed when using the MWPF_RGB format.

Parameters

TypeNameDescription
GR_DRAW_IDidThe ID of the drawable to red pixel data from.
GR_GC_IDgc 
GR_COORDxThe X coordinate at which to draw the area, relative to the drawable.
GR_COORDyThe Y coordinate at which to draw the area, relative to the drawable.
GR_SIZEwidthThe width of the area.
GR_SIZEheightThe height of the area.
GR_PIXELVAL*pixelsPointer to an array of pixel data.
intpixtypeThe format of the pixel data. See below for a list of the available pixel formats.

Pixel Formats

The following table lists the possible pixel format values that may be used with the GrArea() function.

Pixel FormatDescription
MWPF_RGBThis psuedo format is used as a conversion specifier when working with 32 bit RGB format pixel colors.
MWPF_PIXELVALThis psuedo format is used as a no conversion specifier when working with GR_PIXELVAL pixel colors.
MWPF_PALETTEPalettized pixel color format.
MWPF_TRUECOLOR0888Packed 32 bit 0/8/8/8 true color format.
MWPF_TRUECOLOR888Packed 24 bit 8/8/8 truecolor format.
MWPF_TRUECOLOR565Packed 16 bit 5/6/5 truecolor format.
MWPF_TRUECOLOR555Packed 16 bit 0/5/5/5 truecolor format.
MWPF_TRUECOLOR332Packed 8 bit 3/3/2 truecolor format.

See Also

GrReadArea(), GrCopyArea().