BitBlt参数含义

原创 2013年12月06日 02:52:07

【转载请注明出处: http://blog.csdn.net/lzl124631x


接口

BOOL BitBlt(

  _In_  HDC hdcDest,
  _In_  int nXDest,
  _In_  int nYDest,
  _In_  int nWidth,
  _In_  int nHeight,
  _In_  HDC hdcSrc,
  _In_  int nXSrc,
  _In_  int nYSrc,
  _In_  DWORD dwRop
);


坐标、大小参数的含义

图片大小550×342

当nWidth和nHeight大于原图片大小时,图片正常输出。

BitBlt(hdc,0,0,1000,1000,buf_hdc,0,0,SRCCOPY);


当某一维小于图片尺寸的时候,图片被剪裁

BitBlt(hdc,0,0,1000,180,buf_hdc,0,0,SRCCOPY);


nXSrc和nYSrc决定了从源HDC的哪个点开始截取图

BitBlt(hdc,0,0,550,342,buf_hdc,100,100,SRCCOPY);


当nXSrc和nYSrc为负数的时候

BitBlt(hdc,0,0,550,342,buf_hdc,-100,-100,SRCCOPY);


nXDest和nYDest决定了从目标HDC的哪个点开始贴图
BitBlt(hdc,100,100,550,342,buf_hdc,0,0,SRCCOPY);



参数dwRop的含义

background: 640×400

foreground: 519×292

BLACKNESS: Fills the destination rectangle using the color associated with index 0 in the physical palette. (This color is black for the default physical palette.)


CAPTUREBLT: Includes any windows that are layered on top of your window in the resulting image. By default, the image only contains your window. Note that this generally cannot be used for printing device contexts.


DSTINVERT: Inverts the destination rectangle.


MERGECOPY: Merges the colors of the source rectangle with the brush currently selected in hdcDest, by using the Boolean AND operator.


MERGEPAINT: Merges the colors of the inverted source rectangle with the colors of the destination rectangle by using the Boolean OR operator.


NOMIRRORBITMAP: Prevents the bitmap from being mirrored.


NOTSRCCOPY: Copies the inverted source rectangle to the destination.


NOTSRCERASE: Combines the colors of the source and destination rectangles by using the Boolean OR operator and then inverts the resultant color.


PATCOPY: Copies the brush currently selected in hdcDest, into the destination bitmap.


PATINVERT: Combines the colors of the brush currently selected in hdcDest, with the colors of the destination rectangle by using the Boolean XOR operator.


PATPAINT: Copies the brush currently selected in hdcDest, into the destination bitmap.


SRCAND: Combines the colors of the source and destination rectangles by using the Boolean AND operator.


SRCCOPY: Copies the source rectangle directly to the destination rectangle.


SRCERASE: Combines the inverted colors of the destination rectangle with the colors of the source rectangle by using the Boolean AND operator.


SRCINVERT: Combines the colors of the source and destination rectangles by using the Boolean XOR operator.


SRCPAINT: Combines the colors of the source and destination rectangles by using the Boolean OR operator.


WHITENESS: Fills the destination rectangle using the color associated with index 1 in the physical palette. (This color is white for the default physical palette.)


版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

《MFC游戏开发》笔记五 定时器和简单动画

本系列文章由七十一雾央编写,转载请注明出处。 http://blog.csdn.net/u011371356/article/details/9313239 作者:七十一雾央 新浪微博:http:...

《MFC游戏开发》笔记六 图像双缓冲技术:实现一个流畅的动画

本系列文章由七十一雾央编写,转载请注明出处。  http://blog.csdn.net/u011371356/article/details/9299121 作者:七十一雾央 新浪微博:http...

《MFC游戏开发》笔记四 键盘响应和鼠标响应:让人物动起来

本系列文章由七十一雾央编写,转载请注明出处。 http://blog.csdn.net/u011371356/article/details/9313239 作者:七十一雾央 新浪微博:http:...

BitBlt参数详解

对BitBlt()这个函数的最后一个参数的意义一直不是太了解,只会使用SRCCOPY ,最近的一个项目使用到了这个函数,但是要求要背景透明的将源绘制到目标区域上,源是背景色和字,怎么只拷贝字而把背景色...

ajp各参数含义

  • 2012-02-15 13:58
  • 18KB
  • 下载

java参数后面 跟 三个点 含义 详解

java参数后面跟三个点是什么意思 (2011-04-14 11:55:36)转载 标签: it    分类: OutStandingIdeas AVA中类型后面跟三个点是什么来的。 浏览次数:...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)