WINCE下的BLENDFUNCTION

很奇怪, 在WINCE6的模拟器下,如果使用AlphaBlend,则BLENDFUNCTION的AlphaFormat必须设置为零才有效, 而MSDN里的定义是只有AC_SRC_ALPHA. 真矛盾.

 

BLENDFUNCTION

This structure controls blending by specifying the blending functions for source and destination bitmaps.

typedef struct _BLENDFUNCTION {
  BYTE  BlendOp;
  BYTE  BlendFlags;
  BYTE  SourceConstantAlpha;
  BYTE  AlphaFormat;
}BLENDFUNCTION, *PBLENDFUNCTION, *LPBLENDFUNCTION;
Members
BlendOp
Specifies the source blend operation. Currently, the only source and destination blend operation that has been defined is AC_SRC_OVER. For details, see the following Remarks section.
BlendFlags
Must be zero.
SourceConstantAlpha
Specifies an alpha transparency value to be used on the entire source bitmap. The SourceConstantAlpha value is combined with any per-pixel alpha values in the source bitmap. If you set SourceConstantAlpha to 0, it is assumed that your image is transparent. When you only want to use per-pixel alpha values, set the SourceConstantAlpha value to 255 (opaque) .
AlphaFormat
This member controls the way the source and destination bitmaps are interpreted. The following table shows the value for AlphaFormat.
ValueDescription
AC_SRC_ALPHAThis flag is set when the bitmap has an Alpha channel (that is, per-pixel alpha). Because this API uses premultiplied alpha, the red, green and blue channel values in the bitmap must be premultiplied with the alpha channel value. For example, if the alpha channel value is x, the red, green and blue channels must be multiplied by x and divided by 0xff before the call.
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值