将Imagelist里的图像复制到TCanvas上的指定区域
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上的指定区域的更多相关文章
- opencv中的图像复制、保存和显示
接下来几天会写一个opencv的基础系列,与各位相互学习! &1 图像操作 声明图像指针:IplImage* 读入图像: cvLoadImage 创建图像:cvCreateImage 复制图像 ...
- 转JS--通过按钮直接把input或者textarea里的值复制到粘贴板里
document.activeElement属性为HTML 5中新增的document对象的一个属性,该属性用于返回光标所在元素.当光标未落在页面中任何元素内时,属性值返回body元素. setSel ...
- canvas上的像素操作(图像复制,细调)
canvas上的像素操作(图像复制,细调) 总结 1.操作对象:ImageData 对象,其实是canvas的像素点集合 2.主要操作: var obj=ctx.getImageData(0,0,10 ...
- Winform中实现ZedGraph曲线图的图像复制到剪切板、打印预览、获取图片并保存、另存为的功能
场景 Winforn中设置ZedGraph曲线图的属性.坐标轴属性.刻度属性: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/10 ...
- 如何在Web页面里使用高拍仪扫描上传图像
如何在Web页面里使用高拍仪扫描上传图像 市场上所有的高拍仪都支持扫描图片并保存到本地,一般公司都会提供控件.开发人员只需要在页面集成就可以进行拍照和扫描.只不过一般扫描的图片是保存在本地固定的文件夹 ...
- 将 windows 目录结构 复制到 linux 上
思路:生成目录结构文件,复制到linux上,然后建立每个文件即可 借助unix_utils( https://sourceforge.net/projects/unxutils/) 1. window ...
- Android捕捉图像后在SurfaceView上变形显示问题的处理
我们在Android中经常会使用SurfaceView编写自定义的摄像头,可是有的时候会经常会出现图像的变形,我们就会很郁闷的问这到底是为什么呢?其实这个最根本的原因是SurfaceView和PreV ...
- Halcon从某一个图片以指定区域绘制到另一个图像
************************************************************* * Halcon从某一个图片以指定区域绘制到另一个图像 * Author: ...
- 自绘实现半透明水晶按钮(继承CButton,设置BS_OWNERDRAW风格,覆盖DrawItem函数绘制按钮,把父窗口的背景复制到按钮上,实现视觉上的透明,最后通过AlphaBlend实现半透明)
运行效果 实现方法 1.给按钮加上BS_OWNERDRAW样式2.重载DrawItem函数,在这里绘制按钮3.关键之处就是把父窗口的背景复制到按钮上,实现视觉上的透明4.最后通过AlphaBlend实 ...
随机推荐
- 免费的 C/C++ 编译&解释 器列表
摘自<C++编程网>,详细介绍请参考http://www.cpp-prog.com/2009/0520/118.html MicrosoftVisual C++ 2008 Express ...
- 学习鸟哥的Linux私房菜笔记(10)——bash2
七.命令行表达式 命令行输出--" " 将一串字符当成一个字符串来对待,如果字符串中包含特殊含义的字符,则转义. 双引号不能将 \ $ ` ! 符号的特殊功能禁止 命令行输出--' ...
- linux下jar包的生存与开机自动启动
前言 作为一名Android开发,有的时候也是要做做其他工作的,前段时间写了一个很简单的java消息转发程序,因为和三方厂商合作,对方只提供了java的sdk,然而我们这边都是清一色的C#后台开发人员 ...
- 单核、多线程与时间片,以Node.js为例
去年写了篇文章<线程与进程的理解>,当时认为线程和CPU的单核多核无关,操作系统可以有很多个线程.但今天看<深入浅出Node.js>一书时,多次提到单线程无法利用多核CPU一类 ...
- ADO.NET - 批量更新或添加数据
方法一:使用SqlBulkCopy实现批量更新或添加数据. SqlBulkCopy类一般只能用来将数据批量插入打数据库中,如果数据表中设置了主键,出现重复数据的话会报错,如果没有设置主键,那么将会添加 ...
- SWFTools PDF转换为SWF
前言 在iText 制作PDF这篇博文中只是简单的介绍了如何制作PDF,为了能让PDF在Web页面中显示,我还需要通过SWFTools工具将PDF文件转换为SWF文件,然后通过SWF文件显示在Web网 ...
- python 快速排序 完整
两头开始 以第一个为基准,从有往左,找第一个比基准数 大的,然后交换 从左往右,找第一个比基准数晓得,然后交换 遍历剩下的 基准数 左边的数们 以及 基准数 右边的数们 def quick_so ...
- Tomcat 8(十)HTTP/AJP Connector、Bio/Nio/Apr性能对照
Tomcat 8(七)解读Bootstrap介绍过,Connector初始化/启动的时候,将初始化/启动内部的ProtocolHandler.事实上ProtocolHandler仅仅是个接口 Prot ...
- Unity3d 鼠标的事件GetMouseButtonDown()、GetMouseButton()、GetMouseButtonUp()
当鼠标按键按下时,返回一次true,后面參数0是左键,1是右键,2是中键 if(Input.GetMouseButtonDown(0)) Debug.Log("Pressed left cl ...
- js调查server
<script type="text/javascript"> function showUnreadNews() { $(document).ready(functi ...