青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

S.l.e!ep.¢%

像打了激速一樣,以四倍的速度運(yùn)轉(zhuǎn),開心的工作
簡(jiǎn)單、開放、平等的公司文化;尊重個(gè)性、自由與個(gè)人價(jià)值;
posts - 1098, comments - 335, trackbacks - 0, articles - 1
  C++博客 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

BLENDFUNCTION

Posted on 2010-09-07 14:39 S.l.e!ep.¢% 閱讀(926) 評(píng)論(1)  編輯 收藏 引用 所屬分類: DirectUI

typedef struct _BLENDFUNCTION {
? BYTE BlendOp;
? BYTE BlendFlags;
? BYTE SourceConstantAlpha;
? BYTE AlphaFormat;
} BLENDFUNCTION, *PBLENDFUNCTION, *LPBLENDFUNCTION;


The BLENDFUNCTION structure controls blending by specifying the blending functions for source and destination bitmaps.
BLENDFUNCTION這種結(jié)構(gòu)的混合控制通過指定源和目標(biāo)位圖的混合功能
BlendOp

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.

指定源混合操作。目前,唯一的源和目標(biāo)混合,已定義的AC_SRC_OVER; 即根據(jù)源alpha值把源圖像疊加到目標(biāo)圖像上。OpenGLalpha混合還支持其他的方式,如常量顏色源。

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. Set the SourceConstantAlpha value to 255 (opaque) when you only want to use per-pixel alpha values.

指定一個(gè)alpha透明度值將用于整個(gè)源位圖;該SourceConstantAlpha值與任何在源位圖的每個(gè)像素的alpha值組合;如果設(shè)置為0,就會(huì)假定你的圖片是透明的;如果需要使用每像素alpha值,設(shè)置SourceConstantAlpha值255(不透明);

AlphaFormat

This member controls the way the source and destination bitmaps are interpreted. AlphaFormat has the following value.

Value Meaning
AC_SRC_ALPHA This flag is set when the bitmap has an Alpha channel (that is, per-pixel alpha). Note that the APIs use premultiplied alpha, which means that 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 prior to the call.


  AlphaFormat 此成員控制源和目標(biāo)位圖的解釋;看以下值:
  AC_SRC_ALPHA 這個(gè)標(biāo)志被設(shè)置當(dāng)那位圖有Alpha通道(也就是說(shuō),每個(gè)像素的Alpha);
  例如,如果Alpha通道值是x,紅色,綠色和藍(lán)色通道必須乘以x和由
  0xff分開在調(diào)用之前

Remarks

When the AlphaFormat member is AC_SRC_ALPHA, the source bitmap must be 32 bpp. If it is not, the AlphaBlend function will fail.

When the BlendOp member is AC_SRC_OVER, the source bitmap is placed over the destination bitmap based on the alpha values of the source pixels.

If the source bitmap has no per-pixel alpha value (that is, AC_SRC_ALPHA is not set), the SourceConstantAlpha value determines the blend of the source and destination bitmaps, as shown in the following table. Note that SCA is used for SourceConstantAlpha here. Also, SCA is divided by 255 because it has a value that ranges from 0 to 255.

Dst.Red= Src.Red * (SCA/255.0)+ Dst.Red * (1.0 - (SCA/255.0))
Dst.Green= Src.Green * (SCA/255.0)+ Dst.Green * (1.0 - (SCA/255.0))
Dst.Blue= Src.Blue * (SCA/255.0)+ Dst.Blue * (1.0 - (SCA/255.0))

?

If the destination bitmap has an alpha channel, then the blend is as follows.

Dst.Alpha= Src.Alpha * (SCA/255.0)+ Dst.Alpha * (1.0 - (SCA/255.0))

?

If the source bitmap does not use SourceConstantAlpha (that is, it equals 0xFF), the per-pixel alpha determines the blend of the source and destination bitmaps, as shown in the following table.

Dst.Red= Src.Red+ (1 - Src.Alpha) * Dst.Red
Dst.Green= Src.Green+ (1 - Src.Alpha) * Dst.Green
Dst.Blue= Src.Blue+ (1 - Src.Alpha) * Dst.Blue

?

If the destination bitmap has an alpha channel, then the blend is as follows.

Dest.alpha= Src.Alpha+ (1 - SrcAlpha) * Dst.Alpha

?

If the source has both the SourceConstantAlpha (that is, it is not 0xFF) and per-pixel alpha, the source is pre-multiplied by the SourceConstantAlpha and then the blend is based on the per-pixel alpha. The following tables show this. Note that SourceConstantAlpha is divided by 255 because it has a value that ranges from 0 to 255.

Src.Red= Src.Red* SourceConstantAlpha / 255.0;
Src.Green= Src.Green* SourceConstantAlpha / 255.0;
Src.Blue= Src.Blue* SourceConstantAlpha / 255.0;
Src.Alpha= Src.Alpha* SourceConstantAlpha / 255.0;
Dst.Red= Src.Red+ (1 - Src.Alpha) * Dst.Red
Dst.Green= Src.Green+ (1 - Src.Alpha) * Dst.Green
Dst.Blue= Src.Blue+ (1 - Src.Alpha) * Dst.Blue
Dst.Alpha= Src.Alpha+ (1 - Src.Alpha) * Dst.Alpha

?

最后一個(gè)字段AlphaFormat有兩個(gè)選擇:0表示常量alpha值,AC_SRC_ALPHA表示每個(gè)像素有各自的alpha通道。

如果AlphaFormat字段為0,源位圖中的所有像素使用同樣的常量alpha值,即SourceConstantAlpha字段中的值,該值實(shí)際上是0255,而不是01。這里0表示完全透明,255表示完全不透明。目標(biāo)像素以255-SourceConstantAlpha值作為alpha值。

如果AlphaFormat字段的值是AC_SRC_ALPHA,源設(shè)備表面的每個(gè)像素必須有各自的alpha通道。即,必須是32-bpp的物理設(shè)備上下文,或是選中了32-bpp DDBDIB段的內(nèi)存設(shè)備上下文。這些情況下,每個(gè)源像素有4個(gè)8位通道:紅、綠、藍(lán)和alpha。每個(gè)像素的alpha通道和SourceConstantAlpha字段一起用于把源和目標(biāo)混合起來(lái)。實(shí)際用于計(jì)算的運(yùn)算式如下:

Tmp.Red ??= Src.Red ??* SourceConstantAlpha / 255;

Tmp.Green = Src.Green * SourceConstantAlpha / 255;

Tmp.Blue ?= Src.Blue ?* SourceConstantAlpha / 255;

Tmp.Alpha = Src.Alpha * SourceConstantAlpha / 255;

Beta????? = 255 – Tmp.alpha;

Dst.Red ??= Tmp.Red? ?+ Round((Beta * Dst.Red? )/255);

Dst.Green = Tmp.Green + Round((Beta * Dst.Green)/255);

Dst.Blue ?= Tmp.Blue ?+ Round((Beta * Dst.Blue )/255);

Dst.Alpha = Tmp.Alpha + Round((Beta * Dst.Alpha)/255);


Feedback

# re: BLENDFUNCTION   回復(fù)  更多評(píng)論   

2012-08-09 09:16 by changmning
有這個(gè)函數(shù)BLENDFUNCTION的用法實(shí)例嗎?
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            一本大道久久a久久综合婷婷| 亚洲免费在线看| 久热国产精品| 亚洲国产日韩欧美在线动漫| 欧美成年人在线观看| 欧美777四色影视在线| 亚洲美女视频| 一区二区三区四区五区视频| 国产毛片一区| 免费人成网站在线观看欧美高清 | 国产日韩欧美不卡| 久久噜噜噜精品国产亚洲综合| 欧美一二三视频| 亚洲激情专区| 在线视频日韩| 国产一区二区三区四区三区四| 久久精品亚洲国产奇米99| 久久久水蜜桃| 亚洲午夜精品17c| 欧美亚洲一级片| 亚洲激情在线播放| 亚洲少妇自拍| 亚洲国产三级在线| 亚洲永久免费视频| 亚洲高清精品中出| 亚洲午夜在线视频| 亚洲国产视频一区| 亚洲免费影视| 99精品视频免费观看| 欧美一区午夜精品| 99精品欧美一区| 久久久久国色av免费观看性色| 亚洲精品网站在线播放gif| 亚洲一区网站| 日韩一级成人av| 久久精品动漫| 亚洲欧美日韩在线高清直播| 美女黄色成人网| 久久精品一级爱片| 国产精品成人观看视频国产奇米| 久久久综合精品| 国产精品天美传媒入口| 亚洲精品在线免费| 亚洲黄色av一区| 久久精品成人一区二区三区| 亚洲视频一区二区在线观看| 免费成人高清在线视频| 久久亚洲欧美| 国产一区二区高清| 亚洲欧美日韩综合| 午夜精彩国产免费不卡不顿大片| 免费欧美日韩国产三级电影| 久久综合九九| 好吊色欧美一区二区三区四区 | 亚洲欧美日韩一区二区三区在线 | 亚洲精品在线视频| 9i看片成人免费高清| 欧美成在线观看| 欧美成人一区二免费视频软件| 国产精品sss| 一本色道**综合亚洲精品蜜桃冫| 亚洲国产精品成人va在线观看| 国产精品一区一区三区| 9l国产精品久久久久麻豆| 欧美激情va永久在线播放| 欧美激情1区2区| 亚洲精品一区二区在线| 嫩草成人www欧美| 亚洲成在人线av| 91久久精品国产91性色tv| 麻豆乱码国产一区二区三区| 欧美波霸影院| 亚洲电影在线播放| 在线精品国产欧美| 欧美ed2k| 99国产精品久久| 午夜亚洲一区| 一区二区在线视频观看| 久久大逼视频| 欧美成人亚洲| 一区二区三欧美| 国产精品欧美风情| 久久精品一区二区| 亚洲第一在线综合网站| 一区二区三区不卡视频在线观看| 久久久久久久国产| 一级日韩一区在线观看| 亚洲高清av| 欧美美女福利视频| 亚洲一区二区三区四区五区黄| 99精品视频免费| 国产欧美日韩精品专区| 久久亚洲私人国产精品va| 日韩系列欧美系列| 久久精品夜色噜噜亚洲aⅴ| 亚洲精品视频在线看| 国产精品久久久久久av下载红粉| 午夜精品美女久久久久av福利| 久久婷婷成人综合色| 一区二区三区.www| 国外精品视频| 欧美三区美女| 久久精品日产第一区二区| 亚洲伦理久久| 久久综合狠狠综合久久激情| 亚洲婷婷综合色高清在线| 精品成人在线观看| 国产精品国产三级国产专播品爱网| 性欧美长视频| 日韩午夜精品| 欧美国产日韩一区二区在线观看| 夜夜爽99久久国产综合精品女不卡| 国产精品久久久对白| 蜜桃伊人久久| 欧美在线黄色| 亚洲天堂视频在线观看| 亚洲国产欧美一区二区三区同亚洲 | 亚洲精品少妇| 久久婷婷丁香| 樱桃成人精品视频在线播放| 欧美高清不卡| 久久激情一区| 亚洲图片在线观看| 亚洲第一精品夜夜躁人人躁| 亚洲欧美精品在线| 亚洲精品一区二区网址 | 欧美岛国激情| 欧美亚洲一区二区三区| 日韩午夜在线观看视频| 在线日韩av片| 红桃视频亚洲| 国产亚洲欧美在线| 国产精品一区二区在线观看| 欧美三级网页| 欧美日本在线观看| 欧美高清一区| 欧美电影免费观看高清| 毛片一区二区三区| 久久艳片www.17c.com| 久久久另类综合| 久久久国产精品一区二区中文 | 亚洲三级国产| 亚洲欧洲视频在线| 亚洲精品网址在线观看| 亚洲人成艺术| 最新国产拍偷乱拍精品| 亚洲精品系列| 一区二区三区 在线观看视频| 亚洲电影免费观看高清完整版在线| 久久狠狠久久综合桃花| 欧美在线综合| 久久偷窥视频| 免费在线播放第一区高清av| 嫩草伊人久久精品少妇av杨幂| 久久免费视频网站| 欧美 日韩 国产 一区| 亚洲成在线观看| 亚洲精品日产精品乱码不卡| 夜夜嗨av一区二区三区网页| 亚洲天堂免费观看| 久久精品国产久精国产思思| 老牛嫩草一区二区三区日本| 欧美精品日韩| 国产美女在线精品免费观看| 国产在线精品成人一区二区三区| 国模一区二区三区| 亚洲精品麻豆| 欧美一区二区播放| 免费在线观看日韩欧美| 亚洲精品国产精品国产自| 亚洲午夜一区二区| 久久久www成人免费无遮挡大片| 久久久精品日韩| 欧美激情中文字幕在线| 国产麻豆9l精品三级站| 亚洲国语精品自产拍在线观看| 亚洲高清在线精品| 亚洲欧美成人一区二区三区| 欧美一级片久久久久久久| 欧美承认网站| 亚洲一区二区三区免费在线观看| 亚洲欧美日韩视频二区| 欧美电影打屁股sp| 国产欧美欧美| 99视频精品免费观看| 久久久久久久一区二区| 99国产精品一区| 久久蜜桃av一区精品变态类天堂| 免费观看欧美在线视频的网站| 欧美日韩精品不卡| 在线观看欧美激情| 午夜精品在线观看| 亚洲国产精品高清久久久| 性欧美video另类hd性玩具| 欧美精品激情在线观看| 国外成人免费视频| 亚洲欧美日韩精品久久| 亚洲精华国产欧美| 久久久综合网站| 国产一区白浆|