谁会做图像蒙板处理的控件阿?

nunu 2006-10-22 10:39:37
谁会做图像蒙板处理的控件阿?
...全文
190 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
IamDeane 2006-11-06
  • 打赏
  • 举报
回复
'Example Name:TransparentBlt
'This project needs 2 pictureboxes
'Picturebox1 must contain a picture with a lot of white pixels (we're going to use white as transparent color)
Private Declare Function TransparentBlt Lib "msimg32.dll" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal crTransparent As Long) As Boolean
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Picture1.AutoSize = True
'API uses pixels
Picture1.ScaleMode = vbPixels
Picture2.ScaleMode = vbPixels
End Sub
Private Sub Picture2_Paint()
'If we don't call DoEvents first, our transparent image will be completely wrong
DoEvents
TransparentBlt Picture2.hdc, 0, 0, Picture2.ScaleWidth, Picture2.ScaleHeight, Picture1.hdc, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, vbWhite
End Sub


nunu 2006-11-05
  • 打赏
  • 举报
回复
有没有TransparentBlt的实例代阿
熊孩子开学喽 2006-10-28
  • 打赏
  • 举报
回复
TransparentBlt 适用于WINDOWS2000及之后的系统,98和ME不适合
YaDa 2006-10-27
  • 打赏
  • 举报
回复
TransparentBlt 在Win98中有内存泄漏的 bug,我吃过苦头。
nunu 2006-10-25
  • 打赏
  • 举报
回复
有没有具体的代码阿,从没做过图像处理方面的开发:(
IamDeane 2006-10-23
  • 打赏
  • 举报
回复
看雪原在线上原来有个蒙板处理的代码,你去看看吧
熊孩子开学喽 2006-10-23
  • 打赏
  • 举报
回复
做图像镂空么?
一个API搞定阿:TransparentBlt
定义:
Private Declare Function TransparentBlt Lib "msimg32.dll" (ByVal hdcDest As Long, ByVal nXOriginDest As Long, ByVal nYOriginDest As Long, ByVal nWidthDest As Long, ByVal nHeightDest As Long, ByVal hdcSrc As Long, ByVal nXOriginSrc As Long, ByVal nYOriginSrc As Long, ByVal nWidthSrc As Long, ByVal nHeightSrc As Long, ByVal crTransparent As Long) As Long
又可以支持透明色镂空贴图,又可以缩放贴图,何乐不为呢。

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧