zoukankan      html  css  js  c++  java
  • AlphaBlend

    AlphaBlend实现透明效果,只是仅仅能针对某块区域进行alpha操作,透明度可设。

    TransparentBlt能够针对某种颜色进行透明,只是透明度不可设。

    AlphaBlend:

    BLENDFUNCTION bn;

    bn.AlphaFormat = 0;

    bn.BlendFlags = 0;

    bn.BlendOp = AC_SRC_OVER;

    bn.SourceConstantAlpha = 0; //透明度设置,0为不透明;255为全然透明

                 

    AlphaBlend(hMemDC,0,385,320,95,hBackGroundDC,0,385,320,95,bn);  

    bn.SourceConstantAlpha = 0:                             bn.SourceConstantAlpha = 100:
        

    bn.SourceConstantAlpha = 255:

    TransparentBlt:

    TransparentBlt(hMemDC,10,0,296,20,hBarDCW,0,0,296,20,RGB(0,0,0));//指定RGB(0,0,0)透明

     

    BitBlt(hMemDC, 10, 21, 296, 20, hBarDCW, 0, 0, SRCCOPY);

  • 相关阅读:
    学习笔记::有上下界的网络流
    zoj2314
    bzoj3261
    bzoj 1898
    bzoj4009
    bzoj4033
    bzoj3389
    bzoj2427
    uva 11825
    交换A与B值的四种方法
  • 原文地址:https://www.cnblogs.com/zfyouxi/p/3793347.html
Copyright © 2011-2022 走看看