please dont rip this site Prev Next

SetStretchBltMode info  Overview  Group

The SetStretchBltMode function sets the bitmap stretching mode in the specified device context.

int SetStretchBltMode(

    HDC hdc,

// handle of device context

    int iStretchMode 

// bitmap stretching mode

   );

Parameters

hdc
Identifies the device context.
iStretchMode
Specifies the stretching mode. It can be one of the following values:

Value

Description

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.

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.

Return Values

If the function succeeds, the return value is the previous stretching mode.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The stretching mode defines how Windows combines rows or columns of a bitmap with existing pixels on a display device when an application calls the StretchBlt function.

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

The HALFTONE mode requires more processing of the source image than the other three modes; it is slower than the others but produces higher quality images. Also note that SetBrushOrgEx must be called after setting the HALFTONE mode to avoid brush misalignment.

Additional stretching modes might also be available depending on the capabilities of the device driver.

See Also

GetStretchBltMode, SetBrushOrgEx, StretchBlt 


file: /Techref/os/win/api/win32/func/src/f82_1.htm, 5KB, , updated: 2000/4/7 11:19, local time: 2024/11/9 14:51,
TOP NEW HELP FIND: 
3.141.19.235:LOG IN
©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://linistepper.com/Techref/os/win/api/win32/func/src/f82_1.htm"> SetStretchBltMode</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?