Patblt
This function uses the paint brush currently selected from the specified device environment to draw the given rectangular area. Combine the pixel and surface pixel of the brush by using the given grating operation.
Prototype: Bool patblt (HDC
HDC , Int
Nxleft , Int
Nyleft , Int
Nwidth , Int
Nheight , DWORD
Dwrop );
Parameters : HDC: Device environment handle. Nxleft and nyleft: Specify the X and Y axes in the upper left corner of the rectangle to be filled. The coordinates are expressed in logical units. Nwidth and nheight: Specify the width and height of the rectangle, expressed in logical units. Dwdrop: Specify the grating operation code. The operation code can take the following values. The meanings of these values are as follows:
Value |
Description |
patcopy |
set Copy the specified mode to the target bitmap. |
Patinvert |
Use BooleanOrThe (OR) operator combines the color of the specified pattern with the color of the target rectangle. |
dstinvert |
set The reverse direction of the target rectangle. |
Blackness |
Use the physical palette and Index0Fill the target rectangle with related colors. (This color is black for the default physical palette ). |
Whiteness |
Use the physical palette and Index1Fill the target rectangle with related colors. (This color is white for the default physical palette ). |
Return Value: If the call succeeds, the return value is non-zero. If the call fails, the return value is 0. For more error information, call
Getlasterror Function.
Note: The dwdrop parameter of this function is limited to all 256 finite subsets of ternary grating operation. In particular, the operation code that involves the source rectangle cannot be used. Not all devices support the palblt function. For more information, see Function
Getdevicecaps The description of the rc_bitblt feature. If HDC specifies the image DC, the horizontal coordinates are increased from right to left instead of left to right. For more information (for information about blitting to displays with right-to-left orientations), see creating bitmaps.
Refer: Interactive Encyclopedia: patblt msdn: patblt