Export (0) Print
Expand All

GetStretchBltMode function

The GetStretchBltMode function retrieves the current stretching mode. The stretching mode defines how color data is added to or removed from bitmaps that are stretched or compressed when the StretchBlt function is called.

Syntax


int GetStretchBltMode(
  _In_  HDC hdc
);

Parameters

hdc [in]

A handle to the device context.

Return value

If the function succeeds, the return value is the current stretching mode. This can be one of the following values.

ValueDescription
BLACKONWHITEPerforms a Boolean AND operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves black pixels at the expense of white pixels.
COLORONCOLORDeletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information.
HALFTONEMaps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels.
STRETCH_ANDSCANSSame as BLACKONWHITE.
STRETCH_DELETESCANSSame as COLORONCOLOR.
STRETCH_HALFTONESame as HALFTONE.
STRETCH_ORSCANSSame as WHITEONBLACK.
WHITEONBLACKPerforms a Boolean OR operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves white pixels at the expense of black pixels.

 

If the function fails, the return value is zero.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Bitmaps Overview
Bitmap Functions
SetStretchBltMode

 

 

Community Additions

ADD
Show:
© 2015 Microsoft