GetROP2 function

The GetROP2 function retrieves the foreground mix mode of the specified device context. The mix mode specifies how the pen or interior color and the color already on the screen are combined to yield a new color.

Syntax


int GetROP2(
  _In_  HDC hdc
);

Parameters

hdc [in]

Handle to the device context.

Return value

If the function succeeds, the return value specifies the foreground mix mode.

If the function fails, the return value is zero.

Remarks

Following are the foreground mix modes.

Mix modeDescription
R2_BLACKPixel is always 0.
R2_COPYPENPixel is the pen color.
R2_MASKNOTPENPixel is a combination of the colors common to both the screen and the inverse of the pen.
R2_MASKPENPixel is a combination of the colors common to both the pen and the screen.
R2_MASKPENNOTPixel is a combination of the colors common to both the pen and the inverse of the screen.
R2_MERGENOTPENPixel is a combination of the screen color and the inverse of the pen color.
R2_MERGEPENPixel is a combination of the pen color and the screen color.
R2_MERGEPENNOTPixel is a combination of the pen color and the inverse of the screen color.
R2_NOPPixel remains unchanged.
R2_NOTPixel is the inverse of the screen color.
R2_NOTCOPYPENPixel is the inverse of the pen color.
R2_NOTMASKPENPixel is the inverse of the R2_MASKPEN color.
R2_NOTMERGEPENPixel is the inverse of the R2_MERGEPEN color.
R2_NOTXORPENPixel is the inverse of the R2_XORPEN color.
R2_WHITEPixel is always 1.
R2_XORPENPixel is a combination of the colors in the pen and in the screen, but not in both.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Painting and Drawing Overview
Painting and Drawing Functions
SetROP2

 

 

Build date: 6/12/2013

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.