The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Pattern Block Transfer

The name of the PatBlt function (an abbreviation for pattern block transfer) implies that this function simply replicates the brush (or pattern) until it fills a specified rectangle. However, the function is actually much more powerful. Before replicating the brush, it combines the color data for the pattern with the color data for the existing pixels on the video display by using a raster operation (ROP). An ROP is a bitwise operation that is applied to the bits of color data for the replicated brush and the bits of color data for the target rectangle on the display device. There are 256 ROPs; however, the PatBlt function recognizes only those that require a pattern and a destination (not those that require a source). The following table identifies the most common ROPs.

PATCOPYCopies the pattern to the destination bitmap.
PATINVERTCombines the destination bitmap with the pattern by using the Boolean XOR operator.
DSTINVERTInverts the destination bitmap.
BLACKNESSTurns all output to binary zeros.
WHITENESSTurns all output to binary ones.


For more information, see Raster Operation Codes.



Community Additions

© 2014 Microsoft