Chinaunix首页 | 论坛 | 博客
  • 博客访问: 180760
  • 博文数量: 38
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 372
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-05 19:39
文章分类

全部博文(38)

文章存档

2011年(1)

2010年(2)

2009年(2)

2008年(33)

我的朋友

分类: C/C++

2008-06-17 11:36:07

::SetDIBitsToDevice(

              //设备上下文句柄,可以是CDC的公共变量m_hDC
                pDC->m_hDC,        // handle to DC
                //指定绘图区域的左上角点坐标
                xDst,    yDst,    // x-y-coord of destination upper-left corner
                //指定DIB的宽高
                dxSrc,    dySrc,    // width-height of source rectangle
                //指定要绘区域的左上角坐标
                xSrc,    ySrc,    // x-y-coord of source upper-left corner
                //指定DIB扫描的起始行
                0,//uStartScan,// first scan line in array
                //指定DIB扫描的高度
                FreeImage_GetHeight(pFIBitmap),    // number of scan lines
                //指向DIB图像数据的指针
                FreeImage_GetBits(pFIBitmap),    // array of DIB bits
                //指向BITMAPINFO的指针
                FreeImage_GetInfo(pFIBitmap),    // bitmap information
               //DIB_RGB_COLORS代表真实的RGB值
                DIB_RGB_COLORS);                // RGB or palette indexes

::StretchDIBits(

              //设备上下文句柄

                pDC->m_hDC,

              //指定绘图区域的左上角点坐标
                xDst,    yDst,    // x-y-coord of destination upper-left corner

              //指定DIB的宽高
                dxDst,    dyDst,    // width-height of destination rectangle

             //指定要绘区域的左上角坐标
                xSrc,    ySrc,    // x-y-coord of source upper-left corner

             //要复制原图矩形区域的宽高
                dxSrc,    dySrc,    // width-height of source rectangle

             //要复制原图矩形区域的宽高指向DIB图像数据区的指针
                pData,            // bitmap bits

             //指向BITMAPINFO的指针
                FreeImage_GetInfo(pFIBitmap),// bitmap data

             //DIB_RGB_COLORS代表真实的RGB值
                DIB_RGB_COLORS,    // usage options

             //绘制方式,常用SRCCOPY,将原位图复制到目标位图
                SRCCOPY);        // raster operation code

阅读(848) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~