网站首页  词典首页

请输入您要查询的函数:

 

术语 setstretchbltmode
释义 SetStretchBltMode
语法:
int SetStretchBltMode(
__in HDC hdc,
__in int iStretchMode
);
SetStretchBltMode函数
该SetStretchBltMode函数设置图拉在指定的设备上下文模式。
参数
hdc [in]
一个句柄,设备上下文。
iStretchMode [in]
在拉伸模式。此参数可以是下列值之一。
ValueMeaning
BLACKONWHITEPerforms布尔和操作使用的颜色值的淘汰,现有的像素。如果位图是一个单色位图,这种模式在保持白色像素为代价黑色像素。
COLORONCOLORDeletes像素。这种模式删除,但不尝试保持其信息的所有像素淘汰线。
从目标矩形成块的像素源矩形HALFTONEMaps像素。在对目标的像素块平均色接近源像素的颜色。
在设置半色调拉伸模式,应用程序必须调用SetBrushOrgEx函数来设置刷的起源。如果它不这样做,刷错位发生。
STRETCH_ANDSCANSSame的BLACKONWHITE。
STRETCH_DELETESCANSSame的COLORONCOLOR。
STRETCH_HALFTONESame的半色调。
STRETCH_ORSCANSSame的WHITEONBLACK。
WHITEONBLACKPerforms行动的布尔或使用的颜色值的淘汰,现有的像素。如果位图是一个单色位图,此模式在保留黑色像素为代价白色像素。
返回值
如果函数成功,返回值是以前的拉伸模式。
如果函数失败,返回值是零。
这个函数可以返回以下值。
返回codeDescription
ERROR_INVALID_PARAMETEROne或输入参数更是无效的。
备注
拉伸模式的定义如何系统结合行或与现有的显示设备像素位图列当应用程序调用StretchBlt函数。
在BLACKONWHITE(STRETCH_ANDSCANS)和WHITEONBLACK(STRETCH_ORSCANS)模式,通常被用来保存单色位图前景像素。在COLORONCOLOR(STRETCH_DELETESCANS)模式通常用于保存彩色位图的颜色。
半色调模式慢,需要比其他三种模式更多的源图像处理,但生产更高质量的图像。另请注意,SetBrushOrgEx成立后必须在半色调模式,以避免刷偏差要求。
附加拉伸模式也可根据提供的设备驱动程序的能力。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
位图概述
位图功能
GetStretchBltMode
SetBrushOrgEx
StretchBlt
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SetStretchBltMode Function
The SetStretchBltMode function sets the bitmap stretching mode in the specified device context.
Syntax
int SetStretchBltMode(
__in HDC hdc,
__in int iStretchMode
);
Parameters
hdc [in]
A handle to the device context.
iStretchMode [in]
The stretching mode. This parameter can be one of the following values.
ValueMeaning
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.
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_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.

Return Value
If the function succeeds, the return value is the previous stretching mode.
If the function fails, the return value is zero.
This function can return the following value.
Return codeDescription
ERROR_INVALID_PARAMETEROne or more of the input parameters is invalid.

Remarks
The stretching mode defines how the system 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 is slower and requires more processing of the source image than the other three modes; 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.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Bitmaps Overview
Bitmap Functions
GetStretchBltMode
SetBrushOrgEx
StretchBlt
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd145089(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:24:50