int SetStretchBltMode(hDC,nStretchMode)
This function sets the stretching mode for the StretchBlt function. The stretching mode defines which scan lines and/or columns StretchBlt eliminates when contracting a bitmap.
Parameter | Type/Description |
hDC | HDC Identifies the device context. | ||
nStretchMode | int Specifies the new stretching mode. It can be one of the following values: | ||
Value | Meaning | ||
BLACKONWHITE | AND in the eliminated lines. This mode preserves black pixels at the expense of white pixels by using the AND operator on the eliminated lines and those remaining. | ||
COLORONCOLOR | Deletes the eliminated lines. This mode deletes all eliminated lines without trying to preserve their information. | ||
WHITEONBLACK | OR in the eliminated lines. This mode preserves white pixels at the expense of black pixels by using the OR operator on the lines to be eliminated and the remaining lines. | ||
The BLACKONWHITE and WHITEONBLACK modes are typically used to preserve foreground pixels in monochrome bitmaps. The COLORONCOLOR mode is typically used to preserve color in color bitmaps. |
The return value specifies the previous stretching mode. It can be BLACKONWHITE, COLORONCOLOR, or WHITEONBLACK.