<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > UI (User Interface) > Windows API > Win_SetStretchBltMode |
Description
Sets the bitmap stretching mode in the specified device context.
Syntax
n = Win_SetStretchBltMode(hDC, StretchMode)
Returns
Number.
Parameters
Name |
Type |
Optional |
Meaning |
hDC |
Number |
No |
Handle to the device context |
StretchMode |
Number |
No |
Specifies the stretching mode. This parameter can be one of the following values:
%BLACKONWHITE Performs 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.
%COLORONCOLOR Deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information.
%HALFTONE Maps 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.
After setting the %HALFTONE stretching mode, an application must call the SetBrushOrgEx function to set the brush origin. If it fails to do so, brush misalignment occurs.
This option is not supported on Windows 95/98/Me.
%STRETCH_ANDSCANS Same as %BLACKONWHITE.
%STRETCH_DELETESCANS Same as %COLORONCOLOR.
%STRETCH_HALFTONE Same as %HALFTONE.
%STRETCH_ORSCANS Same as %WHITEONBLACK.
%WHITEONBLACK Performs 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.
|
Remarks
For additional info, please refer to MS documentation at: http://msdn.microsoft.com/en-us/library/dd145089(VS.85).aspx
Restrictions
See also
Examples