function Tdmd.Draw_Image_In_Rect(C:TCanvas;R:TRect;i:integer):boolean;
var
  tr:TRect;
begin
    if i<ML.Count then
    begin
      if tempImage=nil then tempImage:=TBitMap.Create;
      ML.GetBitmap(i,tempimage);
      tr.Top:=R.Top+(((R.Bottom-R.Top)-24) div 2)+1;
      tr.Left:=R.Left+(((R.Right-R.Left)-24) div 2+1);
      tr.Right:=tr.Left+23;
      tr.Bottom:=tr.Top+23;
      C.CopyRect(TR,tempimage.Canvas,rect(0,0,24,24));
      result:=true;
    end else result:=false;
end ;

图像复制方式:

TCopyMode values describe how to combine the colors of a source bitmap and a destination bitmap.

The Windows unit defines the following constants for TCopyMode values:

Value 
Meaning 
Fills the destination rectangle on the canvas with black.  
Inverts the image on the canvas and ignores the source.  
Combines the image on the canvas and the source bitmap by using the Boolean AND operator.  
Combines the inverted source bitmap with the image on the canvas by using the Boolean OR operator.  
Copies the inverted source bitmap to the canvas.  
Combines the image on the canvas and the source bitmap by using the Boolean OR operator, and inverts the result.  
Copies the source pattern to the canvas.  
Combines the source pattern with the image on the canvas using the Boolean XOR operator  
Combines the inverted source bitmap with the source pattern by using the Boolean OR operator. Combines the result of this operation with the image on the canvas by using the Boolean OR operator.  
Combines the image on the canvas and source bitmap by using the Boolean AND operator.  
Copies the source bitmap to the canvas.  
Inverts the image on the canvas and combines the result with the source bitmap by using the Boolean AND operator.  
Combines the image on the canvas and the source bitmap by using the Boolean XOR operator.  
Combines the image on the canvas and the source bitmap by using the Boolean OR operator.  
Fills the destination rectangle on the canvas with white.  

http://blog.sina.com.cn/s/blog_56294d0a0100tnsd.html

将Imagelist里的图像复制到TCanvas上的指定区域的更多相关文章

  1. opencv中的图像复制、保存和显示

    接下来几天会写一个opencv的基础系列,与各位相互学习! &1 图像操作 声明图像指针:IplImage* 读入图像: cvLoadImage 创建图像:cvCreateImage 复制图像 ...

  2. 转JS--通过按钮直接把input或者textarea里的值复制到粘贴板里

    document.activeElement属性为HTML 5中新增的document对象的一个属性,该属性用于返回光标所在元素.当光标未落在页面中任何元素内时,属性值返回body元素. setSel ...

  3. canvas上的像素操作(图像复制,细调)

    canvas上的像素操作(图像复制,细调) 总结 1.操作对象:ImageData 对象,其实是canvas的像素点集合 2.主要操作: var obj=ctx.getImageData(0,0,10 ...

  4. Winform中实现ZedGraph曲线图的图像复制到剪切板、打印预览、获取图片并保存、另存为的功能

    场景 Winforn中设置ZedGraph曲线图的属性.坐标轴属性.刻度属性: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10 ...

  5. 如何在Web页面里使用高拍仪扫描上传图像

    如何在Web页面里使用高拍仪扫描上传图像 市场上所有的高拍仪都支持扫描图片并保存到本地,一般公司都会提供控件.开发人员只需要在页面集成就可以进行拍照和扫描.只不过一般扫描的图片是保存在本地固定的文件夹 ...

  6. 将 windows 目录结构 复制到 linux 上

    思路:生成目录结构文件,复制到linux上,然后建立每个文件即可 借助unix_utils( https://sourceforge.net/projects/unxutils/) 1. window ...

  7. Android捕捉图像后在SurfaceView上变形显示问题的处理

    我们在Android中经常会使用SurfaceView编写自定义的摄像头,可是有的时候会经常会出现图像的变形,我们就会很郁闷的问这到底是为什么呢?其实这个最根本的原因是SurfaceView和PreV ...

  8. Halcon从某一个图片以指定区域绘制到另一个图像

    ************************************************************* * Halcon从某一个图片以指定区域绘制到另一个图像 * Author: ...

  9. 自绘实现半透明水晶按钮(继承CButton,设置BS_OWNERDRAW风格,覆盖DrawItem函数绘制按钮,把父窗口的背景复制到按钮上,实现视觉上的透明,最后通过AlphaBlend实现半透明)

    运行效果 实现方法 1.给按钮加上BS_OWNERDRAW样式2.重载DrawItem函数,在这里绘制按钮3.关键之处就是把父窗口的背景复制到按钮上,实现视觉上的透明4.最后通过AlphaBlend实 ...

随机推荐

  1. WPF入门(三)->两个几何图形合并(CombinedGeometry)

    原文:WPF入门(三)->两个几何图形合并(CombinedGeometry) 在WPF中,提供了一个CombinedGeometry对象可以使两个几何图形合并产生效果 CombinedGeom ...

  2. QSettings提供了非常方便的注册表读写

    Qt的QSettings提供了非常方便的注册表读写 写入: //写入注册表 void setRegValue( QString strPath, QString strItemName, QStrin ...

  3. 关于CORS跨域更细节的思考

    权威的资料看MDN,也可以看阮一峰的文章.不过感觉阮一峰对于CORS的描述有问题,简单请求被阮一峰描述为2次浏览器请求了.这个要自己搭个服务器试一下.跨域基本都是根据域名判断的,自己是否要再买个域名呢 ...

  4. Excel创button宏调用

    今天,匆匆写了一个宏,但发现已被用来创建button开发工具菜单不见了. 在十分钟找Excel转了个遍,终究Excel通常使用在中的选项,首先Mark下一个,离开同样找不到鞋. 几个截面图.促进突然, ...

  5. 一个2013届毕业生(踏上IT行业)的迷茫(2)

    初中的时光是一段艰辛,但幸福的时光,在这一段时光中同样我遇到了我人生中第二个贵人.记得在小学毕业的那个暑假里,我知道上了初中会开一门叫做英语的课程,那时候在我们那里有好多上过初中.高中的在我们小学开英 ...

  6. OVS 派OFPT_PORT_STATUS 流程

    依据openflow合约[OFP1.0-38],当从物理端口ovs datapath 添加,改动或者删除的时候.都会先运行详细动作.然后通过ofp_port_status异步消息告知Controlle ...

  7. Delphi 禁用x64位系统文件重定向功能

    在X64系统里面,一些特殊的目录和特殊的注册表键被分为2个独立的部分.对于文件系统来说,      %systemroot%\system32 目录被保留给64位文件使用,而32位文件会被重定向到%s ...

  8. 获 Linux 支持的开源指令集 RISC-V 投身存储和 AI 领域

    EETimes 消息,WD 宣布将在 RISC-V 处理器上实现标准化,并投资了一家初创公司 Esperanto Technologies —— 该公司主要采用开源指令集架构设计高级 SoC 和核心. ...

  9. WPF中制作立体效果的文字或LOGO图形(续)

    原文:WPF中制作立体效果的文字或LOGO图形(续) 上篇"WPF中制作立体效果的文字或LOGO图形"(http://blog.csdn.net/johnsuna/archive/ ...

  10. c语言bit倒置最好的算法-离msb-lsb至lsb-msb

    问题 什么是例如最好的算法,下面的转换? 0010 0000 => 0000 0100 从详细的转换MSB->LSB至LSB->MSB, 所有的Bit必须扭转,着.这并非字节顺序的交 ...