当前位置:网站首页>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";
}
边栏推荐
- #WeArePlay | 与更多开发者一起,探索新世界
- kustomize entry example and basic syntax instructions
- 激光熔覆在农机修复强化中的应用及研究方向
- Redis源码剖析之字典(dict)
- OOM排查和处理
- Data Mining-06
- How to save Simulink simulation model as image or PDF
- The sword refers to Offer 57 - II. and is a continuous positive sequence of s (sliding window)
- 30行代码实现蚂蚁森林自动偷能量
- LeetCode 37.解数独
猜你喜欢
[HCIP Continuous Update] Principle and Configuration of IS-IS Protocol
工作任务统计
WSA toolkit installed app store tip doesn't work how to solve?
Final assignment of R language data analysis in a university
联通网管协议框图
Redis源码剖析之字典(dict)
30行代码实现蚂蚁森林自动偷能量
jenkins api create custom pipeline
GIN Bind模式获取参数和表单验证
面试题精选:神奇的斐波那契数列
随机推荐
Use RecyclerView to implement three-level collapsed list
GIN中GET POST PUT DELETE请求
农村区县域农业电商如何做?数字化转型如何进行?
陈强教授《机器学习及R应用》课程 第十七章作业
5G China unicom 一般性异常处理
激光熔覆在农机修复强化中的应用及研究方向
The FPGA - work summary recently
Introduction to Flutter advanced trip Dialog&Toast (10)
The sword refers to the offer, cuts the rope 2
绘制混合密度函数图以及添加分位数线
ViewPager fragments of nested data blank page abnormal problem analysis
电脑重装系统还原0x80070005错误如何解决
jenkins api创建自定义pipeline
JVM之配置介绍(一)
leetcode 20. Valid Parentheses 有效的括号(中等)
Do you know the difference between comments, keywords, and identifiers?
CPU-MIPS32 instruction architecture (unlocked pipeline microprocessor)
ctfshow七夕杯2022
NFS 特别注意权限的问题
【FPGA教程案例48】图像案例8——基于FPGA的RGB图像转化为HSV图像的实现,通过MATLAB进行辅助验证