當前位置:歷史故事大全網 - 範文作文 - C# GDI+导入如何让背景透明

C# GDI+导入如何让背景透明

GDI+中这个重载函数可以实现

Graphics.DrawImage ( _

image As Image, _

destRect As Rectangle, _

srcX 作为整数,_

srcY 作为整数,_

srcWidth 作为整数,_

srcHeight 作为整数,_

< p> srcUnit As GraphicsUnit, _

imageAttr As ImageAttributes _

)

ImageAttributes 有一个成员方法.SetColorKey(Color, Color) ,可以设置透明色 范围.如果你要做透明度也可以修改其他属性。比如使用颜色替换,背景颜色替换成半透明颜色

  • 上一篇:基建會計中的代建費應計入什麽科目
  • 下一篇:有誰知道nba2012年全明星賽東西部的球員名單和對應的球號。。
  • copyright 2024歷史故事大全網