网站首页  词典首页

请输入您要查询的函数:

 

术语 maskblt
释义 MaskBlt
语法:
BOOL MaskBlt(
__in HDC hdcDest,
__in int nXDest,
__in int nYDest,
__in int nWidth,
__in int nHeight,
__in HDC hdcSrc,
__in int nXSrc,
__in int nYSrc,
__in HBITMAP hbmMask,
__in int xMask,
__in int yMask,
__in DWORD dwRop
);
MaskBlt功能
该MaskBlt功能结合起来的源和目标位图使用指定的面具,光栅操作的颜色数据。
参数
hdcDest [in]
句柄到目标设备上下文。
nXDest [in]
的x坐标,按逻辑单位,对目标矩形左上角。
nYDest [in]
在y坐标,按逻辑单位,对目标矩形左上角。
nWidth [in]
宽度,按逻辑单位,目标矩形和源位图。
nHeight [in]
的高度,以逻辑单位,目标矩形和源位图。
hdcSrc [in]
阿处理设备环境从该图是要复制的。它必须是零,如果dwRop参数指定光栅操作不包括源。
nXSrc [in]
的x坐标,按逻辑单位,对源位图的左上角。
nYSrc [in]
在y坐标,按逻辑单位,对源位图的左上角。
hbmMask [in]
一个句柄,单色掩码位图与源设备环境的颜色位图相结合。
xMask [in]
Level像素由hbmMask参数指定的掩码位图抵消。
yMask [in]
垂直像素由hbmMask参数指定的掩码位图抵消。
dwRop [in]
前景色和背景三元光栅操作码(专业人员应有)的函数使用控制源和目标数据的组合。背景光栅操作的代码存储在高高此值为词序字节;的前景光栅操作代码在低高此值为词序字节存储,低序此值的词被忽略,应为零。创建的宏MAKEROP4的前景和背景光栅操作码的组合。
如需前景和背景,这一职能的范围内讨论,请参阅下面的备注部分。
对于共同光栅操作码(专业人员应有)列表,请参阅BitBlt函数。请注意,CAPTUREBLT人事登记,一般不能用于印刷设备上下文使用。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
备注
该MaskBlt函数使用依赖于设备的位图。
为1由hbmMask指定的掩码值表明,前景光栅操作代码dwRop规定应适用于该位置。为0的掩码值表示的背景光栅操作代码dwRop规定应适用于该位置。
如果光栅操作需要一个源,面具矩形必须包括源矩形。如果没有,该函数将失败。如果光栅操作不需要源,掩码矩形必须覆盖目标矩形。如果没有,该函数将失败。
如果一个旋转或剪切变换实际上是在源设备时,此函数被调用上下文,就会出现错误。不过,其他类型的转变是允许的。
如果源,图案,颜色格式,位图和目的地不同,此功能转换模式或源格式,或两者兼而有之,以匹配目标格式。
如果掩码位图是不是一个单色位图,就会出现错误。
当一个增强型图元文件已经被记录下来,出现错误(和函数返回FALSE)如果源设备环境标识一个增强型图元文件设备上下文。
并非所有设备都支持MaskBlt功能。应用程序应调用作为RC_BITBLT nIndex GetDeviceCaps函数的参数,以确定设备是否支持这一功能。
如果没有掩码位图是提供的,这个函数的行为完全一样的bitblt,使用前景光栅操作代码。
ICM的:没有色彩管理时执行blits发生。
当用在多个监控系统,无论hdcSrc和hdcDest必须引用相同的设备或功能将失败。要为不同的设备转移,内存位图转换为区议会之间的数据(兼容位图,或屋宇署副署长)到通过调用GetDIBits的DIB。要显示DIB的第二个设备,电话SetDIBits或StretchDIBits函数。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
位图概述
位图功能
BitBLT等
GetDeviceCaps
GetDIBits
PlgBlt
SetDIBits
StretchBlt
StretchDIBits函数
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==MaskBlt Function
The MaskBlt function combines the color data for the source and destination bitmaps using the specified mask and raster operation.
Syntax
BOOL MaskBlt(
__in HDC hdcDest,
__in int nXDest,
__in int nYDest,
__in int nWidth,
__in int nHeight,
__in HDC hdcSrc,
__in int nXSrc,
__in int nYSrc,
__in HBITMAP hbmMask,
__in int xMask,
__in int yMask,
__in DWORD dwRop
);
Parameters
hdcDest [in]
A handle to the destination device context.
nXDest [in]
The x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
nYDest [in]
The y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
nWidth [in]
The width, in logical units, of the destination rectangle and source bitmap.
nHeight [in]
The height, in logical units, of the destination rectangle and source bitmap.
hdcSrc [in]
A handle to the device context from which the bitmap is to be copied. It must be zero if the dwRop parameter specifies a raster operation that does not include a source.
nXSrc [in]
The x-coordinate, in logical units, of the upper-left corner of the source bitmap.
nYSrc [in]
The y-coordinate, in logical units, of the upper-left corner of the source bitmap.
hbmMask [in]
A handle to the monochrome mask bitmap combined with the color bitmap in the source device context.
xMask [in]
The horizontal pixel offset for the mask bitmap specified by the hbmMask parameter.
yMask [in]
The vertical pixel offset for the mask bitmap specified by the hbmMask parameter.
dwRop [in]
The foreground and background ternary raster operation codes (ROPs) that the function uses to control the combination of source and destination data. The background raster operation code is stored in the high-order byte of the high-order word of this value; the foreground raster operation code is stored in the low-order byte of the high-order word of this value; the low-order word of this value is ignored, and should be zero. The macro MAKEROP4 creates such combinations of foreground and background raster operation codes.
For a discussion of foreground and background in the context of this function, see the following Remarks section.
For a list of common raster operation codes (ROPs), see the BitBlt function. Note that the CAPTUREBLT ROP generally cannot be used for printing device contexts.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
The MaskBlt function uses device-dependent bitmaps.
A value of 1 in the mask specified by hbmMask indicates that the foreground raster operation code specified by dwRop should be applied at that location. A value of 0 in the mask indicates that the background raster operation code specified by dwRop should be applied at that location.
If the raster operations require a source, the mask rectangle must cover the source rectangle. If it does not, the function will fail. If the raster operations do not require a source, the mask rectangle must cover the destination rectangle. If it does not, the function will fail.
If a rotation or shear transformation is in effect for the source device context when this function is called, an error occurs. However, other types of transformation are allowed.
If the color formats of the source, pattern, and destination bitmaps differ, this function converts the pattern or source format, or both, to match the destination format.
If the mask bitmap is not a monochrome bitmap, an error occurs.
When an enhanced metafile is being recorded, an error occurs (and the function returns FALSE) if the source device context identifies an enhanced-metafile device context.
Not all devices support the MaskBlt function. An application should call the GetDeviceCaps function with the nIndex parameter as RC_BITBLT to determine whether a device supports this function.
If no mask bitmap is supplied, this function behaves exactly like BitBlt, using the foreground raster operation code.
ICM: No color management is performed when blits occur.
When used in a multiple monitor system, both hdcSrc and hdcDest must refer to the same device or the function will fail. To transfer data between DCs for different devices, convert the memory bitmap (compatible bitmap, or DDB) to a DIB by calling GetDIBits . To display the DIB to the second device, call SetDIBits or StretchDIBits .
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
BitBlt
GetDeviceCaps
GetDIBits
PlgBlt
SetDIBits
StretchBlt
StretchDIBits
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd145047(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 9:20:37