TWidgetSet.SetROP2 function
Sets the Foreground Mixing Mode in a device context.
Declaration
function SetROP2(DC: HDC; Mode: Integer): Integer; virtualArguments
DC | The device context. |
Mode | The new mode. |
Function result
The old mode, zero on failure.
Description
The raster operation specifies how foreground painting (Brush, Pen) is combined with the current pixels in the DC. The operation combines bitwise the distinct red, green and blue values in pixel colors.
There are 16 raster operations using the possible combinations of two (boolean) values:
- R2_BLACK
- All black (0).
- R2_COPYPEN
- Pen color.
- R2_MASKNOTPEN
- Dst and not Pen.
- R2_MASKPEN
- Dst and Pen.
- R2_MASKPENNOT
- (Not Dst) and Pen.
- R2_MERGENOTPEN
- Dst or not Pen.
- R2_MERGEPEN
- Dst or Pen.
- R2_MERGEPENNOT
- (Not Dst) or Pen.
- R2_NOP
- Dst (unchanged).
- R2_NOT
- Not Dst.
- R2_NOTCOPYPEN
- Not Pen.
- R2_NOTMASKPEN
- Not (Dst and Pen).
- R2_NOTMERGEPEN
- Not (Dst or Pen).
- R2_NOTXORPEN
- Not (Dst xor Pen).
- R2_WHITE
- All white.
- R2_XORPEN
- Dst xor Pen.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
