StretchBlt creates a mirror image of a bitmap if the signs of the nWidthSrc and nWidthDest parameters or of the nHeightSrc and nHeightDest parameters differ. ![]() The foreground and background colors of the device context with color are used. To convert a color bitmap to a monochrome bitmap, it sets pixels that match the background color to white (1) and sets all other pixels to black (0). If StretchBlt must convert a monochrome bitmap to a color bitmap, it sets white bits (1) to the background color and black bits (0) to the foreground color. If destination, source, and pattern bitmaps do not have the same color format, StretchBlt converts the source and pattern bitmaps to match the destination bitmap. If the source transformation has a rotation or shear, an error occurs. The destination coordinates are transformed by using the transformation currently specified for the destination device context the source coordinates are transformed by using the transformation currently specified for the source device context. If the specified raster operation requires a brush, the system uses the brush currently selected into the destination device context. When an enhanced metafile is being recorded, an error occurs (and the function returns FALSE) if the source device context identifies an enhanced-metafile device context. The color data for pattern or destination pixels is merged after the stretching or compression occurs. StretchBlt stretches or compresses the source bitmap in memory and then copies the result to the destination rectangle. To get extended error information, call GetLastError. Windows CE 1.0 and 1.01 support only the SRCCOPY and SRCINVERT raster operations. See BitBlt for a list of common raster operation codes.įor the complete list of raster operations codes, see Ternary Raster Operations. Raster operation codes define how the system combines colors in output operations that involve a brush, a source bitmap, and a destination bitmap. Specifies the raster operation to be performed. Specifies the height, in logical units, of the source rectangle. Specifies the width, in logical units, of the source rectangle. Specifies the y-coordinate, in logical units, of the upper left corner of the source rectangle. Specifies the x-coordinate, in logical units, of the upper left corner of the source rectangle. Specifies the height, in logical units, of the destination rectangle. Specifies the width, in logical units, of the destination rectangle. Specifies the y-coordinate, in logical units, of the upper left corner of the destination rectangle. ![]() ![]() Specifies the x-coordinate, in logical units, of the upper left corner of the destination rectangle. Handle to the destination device context. ![]() BOOLStretchBlt(HDChdcDest, intnXOriginDest, intnYOriginDest, intnWidthDest, intnHeightDest, HDChdcSrc, intnXOriginSrc, intnYOriginSrc, intnWidthSrc, intnHeightSrc, DWORDdwRop) Windows stretches or compresses the bitmap according to the stretching mode set in the destination device context. This function copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary.
0 Comments
Leave a Reply. |