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.
![]() | Color conversion is only performed when using the MWPF_RGB format. |
Type | Name | Description |
---|---|---|
GR_DRAW_ID | id | The ID of the drawable to red pixel data from. |
GR_GC_ID | gc | |
GR_COORD | x | The X coordinate at which to draw the area, relative to the drawable. |
GR_COORD | y | The Y coordinate at which to draw the area, relative to the drawable. |
GR_SIZE | width | The width of the area. |
GR_SIZE | height | The height of the area. |
GR_PIXELVAL* | pixels | Pointer to an array of pixel data. |
int | pixtype | The format of the pixel data. See below for a list of the available pixel formats. |
The following table lists the possible pixel format values that may be used with the GrArea() function.
Pixel Format | Description |
---|---|
MWPF_RGB | This psuedo format is used as a conversion specifier when working with 32 bit RGB format pixel colors. |
MWPF_PIXELVAL | This psuedo format is used as a no conversion specifier when working with GR_PIXELVAL pixel colors. |
MWPF_PALETTE | Palettized pixel color format. |
MWPF_TRUECOLOR0888 | Packed 32 bit 0/8/8/8 true color format. |
MWPF_TRUECOLOR888 | Packed 24 bit 8/8/8 truecolor format. |
MWPF_TRUECOLOR565 | Packed 16 bit 5/6/5 truecolor format. |
MWPF_TRUECOLOR555 | Packed 16 bit 0/5/5/5 truecolor format. |
MWPF_TRUECOLOR332 | Packed 8 bit 3/3/2 truecolor format. |