网站首页  词典首页

请输入您要查询的函数:

 

术语 alphablend
释义 AlphaBlend
语法:
BOOL AlphaBlend(
__in HDC hdcDest,
__in int xoriginDest,
__in int yoriginDest,
__in int wDest,
__in int hDest,
__in HDC hdcSrc,
__in int xoriginSrc,
__in int yoriginSrc,
__in int wSrc,
__in int hSrc,
__in BLENDFUNCTION ftn
);
AlphaBlend函数
该AlphaBlend函数显示位图的透明或半透明的像素。
参数
hdcDest [in]
句柄到目标设备上下文。
xoriginDest [in]
的x坐标,按逻辑单位,对目标矩形左上角。
yoriginDest [in]
在y坐标,按逻辑单位,对目标矩形左上角。
wDest [in]
宽度,按逻辑单位,目标矩形。
hDest [in]
的高度,以逻辑单位,目标矩形。
hdcSrc [in]
句柄到源设备上下文。
xoriginSrc [in]
的x坐标,按逻辑单位,对源矩形的左上角。
yoriginSrc [in]
在y坐标,按逻辑单位,对源矩形的左上角。
wSrc [in]
宽度,按逻辑单位,源矩形。
钢骨高强混凝土 [in]
的高度,以逻辑单位,源矩形。
固网 [in]
在α-混合的源和目标位图,全球Alpha值将适用于整个源位图和格式为源位图信息的功能。源和目标混合功能目前仅限AC_SRC_OVER。见BLENDFUNCTION和EMRALPHABLEND结构。
返回值
如果函数成功,返回值为TRUE。
如果函数失败,返回值为FALSE。
这个函数可以返回以下值。
返回codeDescription
ERROR_INVALID_PARAMETEROne或输入参数更是无效的。
备注
如果源矩形和目的矩形不一样大小,源位图被拉伸以匹配目标矩形。如果SetStretchBltMode函数使用,iStretchMode值自动转换为这个(即BLACKONWHITE,WHITEONBLACK,和网纹更改为COLORONCOLOR功能COLORONCOLOR)。
目标坐标转换目前使用的目标设备环境中指定的转变。源坐标转换目前使用的源设备上下文指定的转变。
发生错误(和函数返回FALSE)如果源设备环境标识一个增强型图元文件设备上下文。
如果目标和源位图没有相同的颜色格式,AlphaBlend源位图转换以匹配目标位。
AlphaBlend不支持镜像。如果任的宽度或源或目标的高度为负,此调用将失败。
当渲染到打印机,与SHADEBLENDCAPS首先调用GetDeviceCaps以确定是否与AlphaBlend打印机支持混合。请注意,对于展示区,所有的融合业务的支持和这些标志的行动是否加速代表。
如果源和目标是相同的surfacethat是,它们都在屏幕或相同的内存位图和源和目标矩形的重叠,出现错误和函数返回FALSE。
源矩形必须完全在于在源表面,否则会发生错误,函数返回FALSE。
AlphaBlend失败如果宽度或源或目标的高度是否定的。
在BLENDFUNCTION SourceConstantaAlpha成员指定的Alpha透明度值是对整个源位图使用。该SourceConstantaAlpha值与任何每个像素的alpha值。如果SourceConstantaAlpha为0,假定该图像是透明的。设置SourceConstantaAlpha值255(这表明,形象是不透明的),当您只需要使用每个像素的alpha值。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinGdi.h(头文件:winuser.h)
LibraryMsimg32.lib
DLLMsimg32.dll
参见
位图概述
位图功能
BLENDFUNCTION
EMRALPHABLEND
GetDeviceCaps
SetStretchBltMode
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==AlphaBlend Function
The AlphaBlend function displays bitmaps that have transparent or semitransparent pixels.
Syntax
BOOL AlphaBlend(
__in HDC hdcDest,
__in int xoriginDest,
__in int yoriginDest,
__in int wDest,
__in int hDest,
__in HDC hdcSrc,
__in int xoriginSrc,
__in int yoriginSrc,
__in int wSrc,
__in int hSrc,
__in BLENDFUNCTION ftn
);
Parameters
hdcDest [in]
A handle to the destination device context.
xoriginDest [in]
The x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
yoriginDest [in]
The y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
wDest [in]
The width, in logical units, of the destination rectangle.
hDest [in]
The height, in logical units, of the destination rectangle.
hdcSrc [in]
A handle to the source device context.
xoriginSrc [in]
The x-coordinate, in logical units, of the upper-left corner of the source rectangle.
yoriginSrc [in]
The y-coordinate, in logical units, of the upper-left corner of the source rectangle.
wSrc [in]
The width, in logical units, of the source rectangle.
hSrc [in]
The height, in logical units, of the source rectangle.
ftn [in]
The alpha-blending function for source and destination bitmaps, a global alpha value to be applied to the entire source bitmap, and format information for the source bitmap. The source and destination blend functions are currently limited to AC_SRC_OVER. See the BLENDFUNCTION and EMRALPHABLEND structures.
Return Value
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE.
This function can return the following value.
Return codeDescription
ERROR_INVALID_PARAMETEROne or more of the input parameters is invalid.

Remarks
If the source rectangle and destination rectangle are not the same size, the source bitmap is stretched to match the destination rectangle. If the SetStretchBltMode function is used, the iStretchMode value is automatically converted to COLORONCOLOR for this function (that is, BLACKONWHITE, WHITEONBLACK, and HALFTONE are changed to COLORONCOLOR).
The destination coordinates are transformed by using the transformation currently specified for the destination device context. The source coordinates are transformed by using the transformation currently specified for the source device context.
An error occurs (and the function returns FALSE) if the source device context identifies an enhanced metafile device context.
If destination and source bitmaps do not have the same color format, AlphaBlend converts the source bitmap to match the destination bitmap.
AlphaBlend does not support mirroring. If either the width or height of the source or destination is negative, this call will fail.
When rendering to a printer, first call GetDeviceCaps with SHADEBLENDCAPS to determine if the printer supports blending with AlphaBlend. Note that, for a display DC, all blending operations are supported and these flags represent whether the operations are accelerated.
If the source and destination are the same surfacethat is, they are both the screen or the same memory bitmap and the source and destination rectangles overlap, an error occurs and the function returns FALSE.
The source rectangle must lie completely within the source surface, otherwise an error occurs and the function returns FALSE.
AlphaBlend fails if the width or height of the source or destination is negative.
The SourceConstantaAlpha member of BLENDFUNCTION specifies an alpha transparency value to be used on the entire source bitmap. The SourceConstantaAlpha value is combined with any per-pixel alpha values. If SourceConstantaAlpha is 0, it is assumed that the image is transparent. Set the SourceConstantaAlpha value to 255 (which indicates that the image is opaque) when you only want to use per-pixel alpha values.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinGdi.h (include Windows.h)
LibraryMsimg32.lib
DLLMsimg32.dll
See Also
Bitmaps Overview
Bitmap Functions
BLENDFUNCTION
EMRALPHABLEND
GetDeviceCaps
SetStretchBltMode
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183351(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:30:16