13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Return valueCommentsTable 4.1Raster operationsBitBltinterface (GOl) combines colors in output operations thatinvolve a current brush, a possible source bitmap, and adestination bitmap. For a list of raster-operation codes,see Table 4.1, "Raster operations."The return value specifies whether the bitmap is drawn. It is nonzero ifthe bitmap is drawn. Otherwise, it is zero.GOI transforms the n Width and nHeight parameters, once by using thedestination display context, and once by using the source display context.If the resulting extents do not match, GOI uses the StretchBlt function tocompress or stretch the source bitmap as necessary. If destination, source,and pattern bitmaps do not have the same color format, the BitBltfunction converts the source and pattern bitmaps to match thedestination. The foreground and background colors of the destination areused in the conversion.If BitBlt converts monochrome bitmaps to color, it sets white bits (1) to thebackground color and black bits (0) to the foreground color. Theforeground and background colors of the destination device context areused. To convert color to monochrome, BitBlt sets pixels that match thebackground color to white (1), and sets all other pixels to black (0). Theforeground and background colors of the color-source device context areused.The foreground color is the current text color for the specified devicecontext, and the background color is the current background color for thespecified device context.Not all devices support the BitBlt function. For more information, see theRC_BITBL T raster capability in the GetDeviceCaps function, later in thischapter.Table 4.1 lists the various raster-operation codes for the dwRop parameter:CodeBLACKNESSDSTINVERTMERGECOPYMERGEPAINTNOTSRCCOPYNOTSRCERASEPATCOPYDescriptionTurns all output black.Inverts the destination bitmap.Combines the pattern and the source bitmap usingthe Boolean AND operator.Combines the inverted source bitmap with thedestination bitmap using the Boolean OR operator.Copies the inverted source bitmap to thedestination.Inverts the result of combining the destination andsource bitmaps using the Boolean OR operator.Copies the pattern to the destination bitmap.IIChapter 4, Functions directory 163

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!