BOOL PatBlt(hdc, nXLeft, nYLeft, nWidth, nHeight, Rop) | |||||
HDC hdc; | /* handle of device context | */ | |||
int nXLeft; | /* upper-left corner of rectangle to be filled | */ | |||
int nYLeft; | /* upper-left corner of rectangle to be filled | */ | |||
int nWidth; | /* width of rectangle to be filled | */ | |||
int nHeight; | /* height of rectangle to be filled | */ | |||
DWORD Rop; | /* raster-operation code | */ |
The PatBlt function paints the given rectangle using the brush that is currently selected into the given device context. The brush color and the surface color(s) are combined using the given raster operation.
hdc
Identifies the device context.
nXLeft
Specifies the logical x-coordinate of the upper-left corner of the rectangle to be filled.
nYLeft
Specifies the logical y-coordinate of the upper-left corner of the rectangle to be filled.
nWidth
Specifies the logical width of the rectangle.
nHeight
Specifies the height of the rectangle.
Rop
Specifies the raster-operation code. This parameter may be one of the following values:
Value | Meaning |
PATCOPY | ||
Copies pattern to destination bitmap. | ||
PATINVERT | ||
Combines destination bitmap with pattern using the Boolean OR operator. | ||
DSTINVERT | ||
Inverts the destination bitmap. | ||
BLACKNESS | ||
Turns all output to binary 0s. | ||
WHITENESS | ||
Turns all output to binary 1s. |
The return value is TRUE if successful. Otherwise it is FALSE.
The values of Rop for this function are a limited subset of the full 256 ternary raster-operation codes; in particular, an operation code that refers to a source cannot be used.
Not all devices support the PatBlt function. For more information, see the description of the RC_BITBLT capability in the GetDeviceCaps function.
GetDeviceCaps