网站首页  词典首页

请输入您要查询的函数:

 

术语 bitblt
释义 BitBlt
语法:
BOOL BitBlt(
__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 DWORD dwRop
);
BitBlt函数
BitBlt函数的执行到目标设备上下文位块的颜色从指定的数据源设备上下文对应的像素矩形转移。
Parameters
hdcDest [in]
句柄到目标设备上下文。
nXDest [in]
的x坐标,按逻辑单位,对目标矩形左上角。
nYDest [in]
在y坐标,按逻辑单位,对目标矩形左上角。
nWidth [in]
宽度,按逻辑单位,源和目标矩形。
nHeight [in]
的高度,以逻辑单位,在源和目标矩形。
hdcSrc [in]
句柄到源设备上下文。
nXSrc [in]
的x坐标,按逻辑单位,对源矩形的左上角。
nYSrc [in]
在y坐标,按逻辑单位,对源矩形的左上角。
dwRop [in]
阿光栅操作码。这些法典规定了如何为源矩形的颜色数据要与目标矩形,以实现最终颜色的颜色数据相结合。
下面列出了一些常见的光栅操作码。
ValueMeaning
BLACKNESSFills目标矩形使用索引的物理调色板0有关的颜色。 (这颜色是黑色的默认物理调色板。)
CAPTUREBLTIncludes上任何您的窗口的顶层在生成的图像窗口。默认情况下,图像只包含您的窗口。请注意,这通常不能用于印刷设备上下文使用。
DSTINVERTInverts目标矩形。
MERGECOPYMerges的hdcDest与目前在选定的画笔源矩形的颜色,通过使用布尔AND运算符。
通过使用布尔OR运算MERGEPAINTMerges了与目标矩形的颜色倒源矩形的颜色。
NOMIRRORBITMAPPrevents位图被镜像。
NOTSRCCOPYCopies倒源矩形到目的地。
NOTSRCERASECombines通过使用布尔OR运算色彩的源和目标矩形,然后反转由此产生的颜色。
PATCOPYCopies在hdcDest当前选定的画笔,到目标位图。
PATINVERTCombines的颜色目前在hdcDest选择刷与目标矩形的颜色,通过使用布尔XOR运算。
PATPAINTCombines目前的颜色在hdcDest选择了刷,渐进式源矩形的颜色,通过使用布尔OR运算。这项行动的结果是结合目标矩形的颜色通过使用布尔OR运算。
SRCANDCombines的颜色使用布尔AND运算符的源和目标矩形。
SRCCOPYCopies源矩形的直接目标矩形。
SRCERASECombines了与源矩形目标矩形的颜色使用布尔AND运算符反色。
SRCINVERTCombines的颜色使用布尔XOR运算的源和目标矩形。
SRCPAINTCombines的颜色通过使用布尔OR运算的源和目标矩形。
WHITENESSFills目标矩形使用索引的物理调色板1有关的颜色。 (这颜色是白色的默认物理调色板。)
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
备注
BitBLT等不仅在裁剪目标DC。
如果一个旋转或剪切变换实际上是在源设备环境,BitBLT等返回一个错误。如果其他变换在源设备环境存在的(和匹配的转变尚未生效,在目标设备环境),在目标设备环境的矩形拉伸,压缩或旋转,必要的。
如果源和目标设备上下文的颜色格式不匹配,那么BitBlt函数将源颜色格式以匹配目标格式。
当一个增强型图元文件都已经被记录,如果发生错误的源设备环境标识一个增强型图元文件设备上下文。
并非所有设备都支持BitBlt函数。有关详细信息,请参阅RC_BITBLT光栅在入口函数GetDeviceCaps能力以及下列功能:MaskBlt,PlgBlt,和StretchBlt。
BitBLT等返回一个错误,如果源和目标设备上下文代表不同的设备。要为不同的设备转移,转换通过调用GetDIBits内存的DIB位图数据之间的区议会。要显示DIB的第二个设备,电话SetDIBits或StretchDIBits函数。
ICM的:没有色彩管理时执行blits发生。
实例
有关示例,请参见捕捉图像。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
位图概述
位图功能
GetDeviceCaps
GetDIBits
MaskBlt
PlgBlt
SetDIBits
StretchBlt
StretchDIBits函数
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==BitBlt Function
The BitBlt function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.
Syntax
BOOL BitBlt(
__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 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 source and destination rectangles.
nHeight [in]
The height, in logical units, of the source and the destination rectangles.
hdcSrc [in]
A handle to the source device context.
nXSrc [in]
The x-coordinate, in logical units, of the upper-left corner of the source rectangle.
nYSrc [in]
The y-coordinate, in logical units, of the upper-left corner of the source rectangle.
dwRop [in]
A raster-operation code. These codes define how the color data for the source rectangle is to be combined with the color data for the destination rectangle to achieve the final color.
The following list shows some common raster operation codes.
ValueMeaning
BLACKNESSFills the destination rectangle using the color associated with index 0 in the physical palette. (This color is black for the default physical palette.)
CAPTUREBLTIncludes any windows that are layered on top of your window in the resulting image. By default, the image only contains your window. Note that this generally cannot be used for printing device contexts.
DSTINVERTInverts the destination rectangle.
MERGECOPYMerges the colors of the source rectangle with the brush currently selected in hdcDest, by using the Boolean AND operator.
MERGEPAINTMerges the colors of the inverted source rectangle with the colors of the destination rectangle by using the Boolean OR operator.
NOMIRRORBITMAPPrevents the bitmap from being mirrored.
NOTSRCCOPYCopies the inverted source rectangle to the destination.
NOTSRCERASECombines the colors of the source and destination rectangles by using the Boolean OR operator and then inverts the resultant color.
PATCOPYCopies the brush currently selected in hdcDest, into the destination bitmap.
PATINVERTCombines the colors of the brush currently selected in hdcDest, with the colors of the destination rectangle by using the Boolean XOR operator.
PATPAINTCombines the colors of the brush currently selected in hdcDest, with the colors of the inverted source rectangle by using the Boolean OR operator. The result of this operation is combined with the colors of the destination rectangle by using the Boolean OR operator.
SRCANDCombines the colors of the source and destination rectangles by using the Boolean AND operator.
SRCCOPYCopies the source rectangle directly to the destination rectangle.
SRCERASECombines the inverted colors of the destination rectangle with the colors of the source rectangle by using the Boolean AND operator.
SRCINVERTCombines the colors of the source and destination rectangles by using the Boolean XOR operator.
SRCPAINTCombines the colors of the source and destination rectangles by using the Boolean OR operator.
WHITENESSFills the destination rectangle using the color associated with index 1 in the physical palette. (This color is white for the default physical palette.)

Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
BitBlt only does clipping on the destination DC.
If a rotation or shear transformation is in effect in the source device context, BitBlt returns an error. If other transformations exist in the source device context (and a matching transformation is not in effect in the destination device context), the rectangle in the destination device context is stretched, compressed, or rotated, as necessary.
If the color formats of the source and destination device contexts do not match, the BitBlt function converts the source color format to match the destination format.
When an enhanced metafile is being recorded, an error occurs if the source device context identifies an enhanced-metafile device context.
Not all devices support the BitBlt function. For more information, see the RC_BITBLT raster capability entry in the GetDeviceCaps function as well as the following functions: MaskBlt , PlgBlt , and StretchBlt .
BitBlt returns an error if the source and destination device contexts represent different devices. To transfer data between DCs for different devices, convert the memory bitmap to a DIB by calling GetDIBits . To display the DIB to the second device, call SetDIBits or StretchDIBits .
ICM: No color management is performed when blits occur.
Examples
For an example, see Capturing an Image .
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
GetDeviceCaps
GetDIBits
MaskBlt
PlgBlt
SetDIBits
StretchBlt
StretchDIBits
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183370(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 11:29:49