Set draw mode
int PgSetDrawMode( int mode );
This function controls how pixels are combined with video memory. You can set mode to one of the following:
mode value | Description |
---|---|
Pg_DRAWMODE_OPAQUE | Use default draw mode (the draw overwrites the screen). |
Pg_DRAWMODE_XOR | XOR drawn pixels with the screen. |
Pg_DRAWMODE_AND | AND drawn pixels with the screen. |
Pg_DRAWMODE_OR | OR drawn pixels with the screen. |
The effect of this function depends on the physical video mode. If the video mode is "true color," the RGB value being drawn will modify the RGB value of the pixel that's in video memory. If the video mode is palette based, the palette index of the draw color will modify the palette index of the pixel that's in video memory. |
To facilitate XOR drawing, you can use the special draw color Pg_INVERT_COLOR. This color remains highly visible regardless of video mode (see PgSetFillColor()). If the video mode is true color, the graphics driver will XOR the screen pixels with pure white. If the video mode is palette based, the driver will invert the pixel index.
The previous drawing mode.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PgDefaultMode(), PgSetFillColor(), PgSetFillDither(), PgSetFillTransPat()