设计房屋的绘图面板
我需要知道是否有可用的 API 或工具,我可以通过它在 Java 表单上放置一个对象,并且在运行时,用户可以绘制方框、圆圈和不同的对象。理想情况下,用户将绘制房屋的布局,因此需要象征门、窗、墙壁、散热器的图标。我不介意这是用 C# 还是 Java 编写的。
I need to know if there is an API or tool available whereby I can drop an object on the Java Form and in run time, the user can draw boxes, circles and different objects. Ideally, the user will be drawing a layout of a house, so icons which symbolise doors, windows, walls, radiators will be required. I don't mind whether this is in C# or Java.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,唯一可以让你做你想做的事情的组件是 Go-Diagram :http://www.nwoods。 com/
但它是商业性的并且是收费的。
不过,我有一个主意给你。
正如其他人所说,开发一个可供人们使用的面板并不困难,但您还需要能够计算出面积、长度和许多其他内容。
编写和使用空间和地图应用程序的人们多年来一直使用“Geos”等工具包
http: //trac.osgeo.org/geos/
现在,不管您可能怎么想,Geos 是一个开源几何引擎,这意味着它不仅对空间和几何有用,而且对几何图形也有用。 GIS 计算,它对于常规几何也很有用。
我认为,您可以使用标准 GDI+ 技术轻松创建一个简单的绘图面板,并使用 Geos 进行计算。
当然,你总是可以看看已经准备好的事情。 DotSpatial 是一个空间& .NET 的映射工具包,尽管名称如此,但它不仅仅用于显示地图。
绘图的一个重要部分就是绘制和创建它们,这让我觉得距离你想要做的事情不到一百万英里。
使用 DotSpatial 作为修改的起点,可能会让您相当快地启动和运行,并且由于它实际上包含绘图组件以及您需要的所有几何函数,那么我认为您可能能够找到元素您需要其中包含的内容。
您可以在 Codeplex 获取 DotSpatial:
http://dotspatial.codeplex.com/
The only component I know of that will allow you to do what you want is Go-Diagram : http://www.nwoods.com/
But it's commercial and it costs.
I do however, have one idea for you.
As others have said, developing a panel that people can draw on is not at all difficult, but you also need to be able to work out areas, lengths and many other things.
People writing and using spatial and mapping apps have had this type of functionality for years using tool-kits like "Geos"
http://trac.osgeo.org/geos/
Now despite what you might think, Geos is an open source geometry engine, which means it's not just useful for spatial & gis calculations, it's also useful for regular geometry too.
I think, you could quite easily create a simple drawing panel using standard GDI+ techniques, and use Geos to do your calculations.
Of course, you could always look to things that have all ready been done. DotSpatial is a spatial & mapping tool-kit for .NET, and again despite the name it's NOT just for displaying maps.
A big part of mapping is drawing and creating them too, which strikes me as not a million miles away from what your attempting to do.
Using DotSpatial as a starting point for modification, might get you up and running fairly quickly, and since it actually has drawing components in it along with all the geometric functions you'll ever need, then I think you might just be able to find elements of what you need contained within it.
You can get DotSpatial at Codeplex:
http://dotspatial.codeplex.com/