SetStretchBltMode

2.x

  int SetStretchBltMode(hdc, fnStretchMode)    
  HDC hdc; /* handle of device context */
  int fnStretchMode; /* bitmap-stretching mode */

The SetStretchBltMode function sets the bitmap-stretching mode. The bitmap-stretching mode defines how information is removed from bitmaps that are compressed by using the StretchBlt function.

Parameters

hdc

Identifies the device context.

fnStretchMode

Specifies the new bitmap-stretching mode. This parameter can be one of the following values:

Value Meaning

STRETCH_ANDSCANS Uses the AND operator to combine eliminated lines with the remaining lines. This mode preserves black pixels at the expense of colored or white pixels. It is the default mode.
STRETCH_DELETESCANS Deletes the eliminated lines. Information in the eliminated lines is not preserved.
STRETCH_ORSCANS Uses the OR operator to combine eliminated lines with the remaining lines. This mode preserves colored or white pixels at the expense of black pixels.

Return Value

The return value is the previous stretching mode, if the function is successful. It can be STRETCH_ANDSCANS, STRETCH_DELETESCANS, or STRETCH_ORSCANS.

Comments

The STRETCH_ANDSCANS and STRETCH_ORSCANS modes are typically used to preserve foreground pixels in monochrome bitmaps. The STRETCH_DELETESCANS mode is typically used to preserve color in color bitmaps.

See Also

GetStretchBltMode, StretchBlt, StretchDIBits