setrop2

This function is used to set current binary raster operation mode.

void setrop2(int mode);

Parameters

mode

Binary grating operating code. This function supports all 16 binary grating operator codes, as listed below:

Value Description
R2_BLACK The drawn pixel color is black.
R2_COPYPEN The drawn pixel color is the current color (default).
R2_MASKNOTPEN The drawn pixel color is screen color AND (NOT current color).
R2_MASKPEN The drawn pixel color is screen color AND current color.
R2_MASKPENNOT The drawn pixel color is NOT screen color AND current color.
R2_MERGENOTPEN The drawn pixel color is screen color OR (NOT current color).
R2_MERGEPEN The drawn pixel color is screen color OR current color.
R2_MERGEPENNOT The drawn pixel color is NOT screen color OR current color.
R2_NOP The drawn pixel color is screen color.
R2_NOT The drawn pixel color is NOT screen color.
R2_NOTCOPYPEN The drawn pixel color is NOT current color.
R2_NOTMASKPEN The drawn pixel color is NOT (screen color AND the current color).
R2_NOTMERGEPEN The drawn pixel color is NOT (screen color OR the current color).
R2_NOTXORPEN The drawn pixel color is NOT (screen color XOR the current color).
R2_WHITE The drawn pixel color is white.
R2_XORPEN The drawn pixel color is screen color XOR current color.

Attention:

  1. AND / OR / NOT / XOR for Boolean operations.
  2. "Screen Color" refers to the color of the screen pixels that are drawn.
  3. "Current Color" refers to the color to be drawn.

Return Value

None

Remarks

The binary raster operator mode set by this function affects only the output of lines and fills, including IMAGE fills, and does not affect the output of text and IMAGE.

Examples

None

(贡献者:Krissi  编辑