Delphi 实现图像热点功能.rar

时间:2022-07-30 06:23:52
【文件属性】:
文件名称:Delphi 实现图像热点功能.rar
文件大小:7KB
文件格式:RAR
更新时间:2022-07-30 06:23:52
Delphi源码-图形处理 Delphi 实现图像热点功能,实现一张图片上不同形状区域的热点,定义椭圆形、四边形、三角形的区域变量的热点,相关代码如下:   var    thepoint:array [1..8] of tpoint;//存储多边形顶点坐标    count:integer;    pointnum:array [1..2] of integer;   begin   //四边形顶点坐标,首末点封闭    thepoint[1]:=point(135,99);    thepoint[2]:=point(105,183);    thepoint[3]:=point(129,201);    thepoint[4]:=point(188,92);    thepoint[5]:=point(135,99);    count:=5;//四边形顶点数目,首末点为一点    fourE_rgn:=CreatePolygonRgn(thepoint,count,WINDING);//生成四边形区域    elli_rgn:=CreateEllipticRgn(64,221,231,263);// 生成椭圆形区域    //第一个三角形顶点坐标    thepoint[1]:=point(118,67);    thepoint[2]:=point(32,28);    thepoint[3]:=point(17,90);    thepoint[4]:=point(118,67);    //第二个三角形顶点坐标    thepoint[5]:=point(155,44);    thepoint[6]:=point(202,91);    thepoint[7]:=point(277,44);    thepoint[8]:=point(155,44);    pointnum[1]:=4;//第一个三角形顶点数目    pointnum[2]:=4;//第二个三角形顶点数目    count:=2;//三角形数目   //生成由两个三角形构成的三角形区域   tri_rgn:=CreatePolyPolygonRgn(thepoint,pointnum,count,WINDING);   end;
【文件预览】:
srcfans.com
----用Delphi实现热点()
--------nRdUnit1.pas(3KB)
--------nRdUnit1.dfm(45KB)
--------nRdMap.bmp(44KB)
--------nRdPro.dpr(192B)
--------nRdUnit1.dcu(6KB)

网友评论