游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1424|回复: 2

求个操做内存实现图片镂空的例子

[复制链接]

9

主题

50

帖子

161

积分

注册会员

Rank: 2

积分
161
发表于 2007-4-8 02:49:00 | 显示全部楼层 |阅读模式
以前在网上见到过,但是现在怎么也找不到了,就是逐点判断图象的屏蔽色和背景合成的方法,现在大多数找到的方法都是用bitblt做逻辑运算,但这样得制作屏蔽图.
谁知道哪有资料给个连接,非常感谢

28

主题

433

帖子

433

积分

中级会员

Rank: 3Rank: 3

积分
433
发表于 2007-4-8 17:28:00 | 显示全部楼层

Re:求个操做内存实现图片镂空的例子

TransparentBlt
The TransparentBlt function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.

BOOL TransparentBlt(
  HDC hdcDest,        // handle to destination DC
  int nXOriginDest,   // x-coord of destination upper-left corner
  int nYOriginDest,   // y-coord of destination upper-left corner
  int nWidthDest,     // width of destination rectangle
  int hHeightDest,    // height of destination rectangle
  HDC hdcSrc,         // handle to source DC
  int nXOriginSrc,    // x-coord of source upper-left corner
  int nYOriginSrc,    // y-coord of source upper-left corner
  int nWidthSrc,      // width of source rectangle
  int nHeightSrc,     // height of source rectangle
  UINT crTransparent  // color to make transparent
);
说了 无数遍了~~~~~

9

主题

50

帖子

161

积分

注册会员

Rank: 2

积分
161
 楼主| 发表于 2007-4-8 22:20:00 | 显示全部楼层

Re: 求个操做内存实现图片镂空的例子

这是MFC下的吧,WIN32毛法直接用啊,记得是定义个指向存放象素内存的指针,然后扫描内存做判断的.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-4-12 14:17

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表