The SetROP2 function sets the current foreground mix mode. GDI uses the foreground mix mode to combine pens and interiors of filled objects with the colors already on the screen. The foreground mix mode defines how colors from the brush or pen and the colors in the existing image are to be combined.
int SetROP2( HDC hdc, int rop2 );
A handle to the device context.
The mix mode. This parameter can be one of the following values.
If the function succeeds, the return value specifies the previous mix mode.
If the function fails, the return value is zero.
Mix modes define how GDI combines source and destination colors when drawing with the current pen. The mix modes are binary raster operation codes, representing all possible Boolean functions of two variables, using the binary operations AND, OR, and XOR (exclusive OR), and the unary operation NOT. The mix mode is for raster devices only; it is not available for vector devices.
For an example, see Using Rectangles.
|Windows version||Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]|
|Header||wingdi.h (include Windows.h)|