将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实 ...
随机推荐
- sparksql 用反射的方式将rdd转换成dataset/dataframe
java public class ReflectionDemo { private static SparkConf conf = new SparkConf().setAppName(" ...
- 详解Qt,并举例说明动态编译(shared)和静态编译(static)以及debug and release 编译版本区别(可产生静态版的Debug版本,需要把-release 改为 –debug-and-release)
作为初入Qt学习的新人,花了整整一两天时间,对Qt编译版本等问题进行了一步步探索,首先感谢网站博客中文章,开始也不是很明白一些几个问题: 1.Qt版本问题 作为初学者,可能下载时这么多版本,如何选择呢 ...
- CAP和最终一致性
查阅资料整理了最终一致性.CAP 相关的内容.由于图省事儿,没有做文字的整理记载,只有 slides 和一些查阅过的链接,大家将就着看.欢迎指正. slides: slides 链接:请戳这里 背景 ...
- 张正友相机标定Opencv实现以及标定流程&&标定结果评价&&图像矫正流程解析(附标定程序和棋盘图)
使用Opencv实现张正友法相机标定之前,有几个问题事先要确认一下,那就是相机为什么需要标定,标定需要的输入和输出分别是哪些? 相机标定的目的:获取摄像机的内参和外参矩阵(同时也会得到每一幅标定图像的 ...
- 数据中台解析Hive SQL过程
一.数据中台解析SQL的目的: 数据中台需要对外提供数据特征查询的能力,因此中台查找并解析各个平台的sql,找出哪些表中的字段经常被使用,以便沉淀为特征,而我们要做的是找出sql中的数据表及其字段.以 ...
- CCD 与 CMOS
窗帘快门与全局快门: 窗帘快门,每次只允许一条缝的光线摄入,因此会呈现自上而下的扫描式拍摄,也就意味着画面上的不同高度,其实拍摄的时间是不同的,也就进一步造成了在高速移动的火车上,如果拍摄窗外的景物, ...
- Bootstrap Thumbnail
Square Thumbnail with Image <!-- Square Thumbnail with Image --> <com.beardedhen.androidboo ...
- OpenGL(十一) BMP真彩文件的显示和复制操作
glut窗口除了可以绘制矢量图之外,还可以显示BMP文件,用函数glDrawPixels把内存块中的图像数据绘制到窗口上,glDrawPixels函数原型: glDrawPixels (GLsizei ...
- .net reactor 学习系列(四)---.net reactor应用场景
原文:.net reactor 学习系列(四)---.net reactor应用场景 前面已经学习了.net reactor一些基础知识,现在准备学习下实际的应用场景,只是简单的保护和 ...
- UVE开发环境搭建及项目启动
1.IDE安装visual studio code ,略: 2.node安装(node-v10.5.0-win-x64.zip),解压即可: 3.配置node环境变量,cmd 输入node -v.np ...