简体   繁体   English

C#使用事件绘制2D对象

[英]C# Drawing 2D objects with events

I need to draw several simple objects (polygons composed by lines and arcs, eventually placed on different layers) inside a form (or any other container) and then handle events like: 我需要在表单(或任何其他容器)内绘制几个简单的对象(由线和弧组成的多边形,最终放置在不同的图层上),然后处理类似以下的事件:

  • right click on object 右键单击对象
  • zoom 放大
  • pan

Is there a library/framework that can handle my need or do I need to create my own? 是否有可以满足我的需要的库/框架,或者我需要创建自己的库/框架?

EDIT FOR CLARIFICATION: 编辑说明:

My polygons come from SDO tables exported from AutoCAD Map 3D and I need to create a simple application that can show them (with pan, zoom, etc) and enable simple operations on them (like viewing properties, insert a point, etc). 我的多边形来自从AutoCAD Map 3D导出的SDO表,我需要创建一个简单的应用程序来显示它们(使用平移,缩放等),并对它们启用简单的操作(例如查看属性,插入点等)。

May be I should look for an AutoCAD OEM license? 我可以寻找AutoCAD OEM许可证吗?

A good example can be found on codeproject called draw tools 在代码项目上可以找到一个很好的例子,称为绘图工具

It has samples of drawing a rectanlge, ellipse, dragging, stretching etc and can be extended to add other basic objects. 它具有绘制矩形,椭圆形,拖动,拉伸等示例,并且可以扩展以添加其他基本对象。 We used the same framework to write a program called Page Layout Pro . 我们使用相同的框架编写了一个名为Page Layout Pro的程序。

Mindfusion有一系列支持您想要的图形库,但是对于您的需求来说可能太复杂了(而且昂贵)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM