当前位置:网站首页>ArcEngine(九)图形绘制
ArcEngine(九)图形绘制
2022-08-09 12:52:00 【稻田里展望者】
图形绘制是GIS系统中一个常用的功能,
MapControl提供了常用的线,圆,矩形,多变形的绘制
需要在axMapControl_OnMouseDown事件中设置绘制的方法
drawMapShape函数
private void drawMapShape(IGeometry geometry)
{
IRgbColor rgbColor;
rgbColor = new RgbColorClass();
rgbColor.Red = 255;
rgbColor.Green = 255;
rgbColor.Blue = 0;
object symbol = null;
if (geometry.GeometryType == esriGeometryType.esriGeometryPolyline ||
geometry.GeometryType == esriGeometryType.esriGeometryLine)
{
ISimpleLineSymbol simpleLineSymbol;
simpleLineSymbol = new SimpleLineSymbolClass();
simpleLineSymbol.Color = rgbColor;
simpleLineSymbol.Width = 5;
symbol = simpleLineSymbol;
}
else
{
ISimpleFillSymbol simpleFillSymbol;
simpleFillSymbol = new SimpleFillSymbolClass();
simpleFillSymbol.Color = rgbColor;
symbol = simpleFillSymbol;
}
axMapControl1.DrawShape(geometry, ref symbol);
}
axMapControl_OnMouseDown事件
private void axMapControl1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
{
if (key == "Draw")
{
IGeometry geometry = this.axMapControl1.TrackCircle();
drawMapShape(geometry);
}
}
按钮事件
private void botton_Click(object sender, EventArgs e)
{
key = "Draw";
}
边栏推荐
- ftplib+ tqdm 上传下载进度条
- 史上最猛“员工”,疯狂吐槽亿万富翁老板小扎:那么有钱,还总穿着同样的衣服!...
- kustomize entry example and basic syntax instructions
- 基于 R 语言的深度学习——简单回归案例
- Yocto 可以下载的第三方库
- Flutter Getting Started and Advanced Tour (8) Button Widget
- Ledong Fire Rescue Brigade was invited to carry out fire safety training for cadres
- FPGA-在ISE中错误总结(更新中)
- Rust 入门指南(使用JSON)
- 陈强教授《机器学习及R应用》课程 第十六章作业
猜你喜欢
第六届“强网杯”全国网络安全挑战赛
Uni - app - uview Swiper shuffling figure component, click on the links to jump (click to get the item after the row data, remove data operation)
novel research
WSA toolkit installed app store tip doesn't work how to solve?
5G China unicom AP:B SMS ASCII Transcoding Requirements
史上最猛“员工”,疯狂吐槽亿万富翁老板小扎:那么有钱,还总穿着同样的衣服!...
绘制混合密度函数图以及添加分位数线
联通网管协议框图
GIN初探,环境安装
npm install失败
随机推荐
telnet+ftp 对设备进行 操控 和 升级
Redis源码剖析之robj(redisObject)
FFmpeg多媒体文件处理(FFMPEG日志系统)
第六届“强网杯”全国网络安全挑战赛
联通网管协议框图
5G China unicom 一般性异常处理
ViewPager fragments of nested data blank page abnormal problem analysis
Professor Chen Qiang's "Machine Learning and R Application" course Chapter 16 Assignment
造自己的芯,让谷歌买单!谷歌再度开源 180nm 工艺的芯片
力扣解法汇总1413-逐步求和得到正数的最小值
[HCIP Continuous Update] Principle and Configuration of IS-IS Protocol
5G China unicom AP:B SMS ASCII Transcoding Requirements
十六进制字符→十进制数字
How to solve the 0x80070005 error when the computer is reinstalled and the system is restored
Bitmaps and bit operations
SQL Server查询优化 (转载非原创)
驻波比计算方法
30行代码实现微信朋友圈自动点赞
Professor Chen Qiang "application in machine learning and R" course chapter 17
glibc memory management model freeing C library memory cache