The PatBlt function paints the given rectangle using the brush that is currently selected into the specified device context. The brush color and the surface color(s) are combined by using the given raster operation.
BOOL PatBlt(
HDC hdc, |
// handle to device context |
int nXLeft, |
// x-coord. of upper-left corner of rect. to be filled |
int nYLeft, |
// y-coord. of upper-left corner of rect. to be filled |
int nWidth, |
// width of rectangle to be filled |
int nHeight, |
// height of rectangle to be filled |
DWORD dwRop |
// raster operation code |
); |
Value |
Meaning |
PATCOPY |
Copies the specified pattern into the destination bitmap. |
PATINVERT |
Combines the colors of the specified pattern with the colors of the destination rectangle by using the Boolean OR operator. |
DSTINVERT |
Inverts the destination rectangle. |
BLACKNESS |
Fills the destination rectangle using the color associated with index 0 in the physical palette. (This color is black for the default physical palette.) |
WHITENESS |
Fills the destination rectangle using the color associated with index 1 in the physical palette. (This color is white for the default physical palette.) |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The values of the dwRop parameter 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 rectangle 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.