13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Stretch BitReturn valueCommentsn WidthnHeighthSrcDCXSrcYSrcnSrc WidthnSrcHeightdwRopint Specifies width (in logical units) of destination rectangle.int Specifies height (in logical units) of destination rectangle.HOC Identifies device context containing source bitmap.int Specifies the logical x-coordinate of the upper-left cornerof the source rectangle.int Specifies the logical y-coordinate of the upper-left cornerof the source rectangle.int Specifies width (logical units) of source rectangle.int Specifies height (logical units) of source rectangle.OWORO Specifies the raster operation to be performed.Raster operation codes define how CDI combines colors inoutput operations that involve a current brush, a possiblesource bitmap, and a destination bitmap. For a list of rasteroperationcodes, see the BitBlt function.The return value specifies whether the bitmap is drawn. It is nonzero ifthe bitmap is drawn. Otherwise, it is zero.StretchBlt stretches or compresses the source bitmap in memory, thencopies the result to the destination. If a pattern is to be merged with theresult, it is not merged until the stretched source bitmap is copied to thedestination.If a brush is used, it is the selected brush in the destination device context.The destination coordinates are transformed according to the destinationdevice context; the source coordinates are transformed according to thesource device context.If destination, source, and pattern bitmaps do not have the same colorformat, StretchBlt converts the source and pattern bitmaps to match thedestination bitmaps. The foreground and background colors of thedestination are used in the conversion.If StretchBlt must convert a monochrome bitmap to color, it sets whitebits 0) to background color and black bits (0) to foreground color. Toconvert color to monochrome, it sets pixels that match the backgroundcolor to white 0), and sets all other pixels to black (0). The foregroundand background colors of the device context with color are used.Not all devices support the StretchBlt function. For more information, seethe RC_BITBLT capability in the GetOeviceCaps function, earlier in thischapter.Chapter 4, Functions directory 551

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

Saved successfully!

Ooh no, something went wrong!