在WPF中构建CAD程序 [英] Building a CAD program in WPF

查看:380
本文介绍了在WPF中构建CAD程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

- 在WPF中构建CAD程序:



我想构建一个具有10000 LINE <的CAD程序/ i>一次一个对象。我正在使用LineGeomery类绘制添加到Canvas的线条。我已经实现了 Zoom Pan ,到目前为止表现非常好。



只有一个专业失望:



线条的厚度在缩放时会缩放。我试图将线条的厚度属性绑定到一个因子以保持它们不变,这可以工作,但在缩放时会显着降低性能。在MouseWheel上清除和绘制具有新厚度的新线条也是不可能的。这个也降低了性能,在当前的方法中也不实用。



- 现在我有什么解决方案?




- 坚持使用当前方法并忽略厚度的变化

- 在GDI中完成整个工作

- WPF中的主机GDI

- 使用WPF Viewport3D(LineThickness会在那里不变吗?)



- 其他解决方案?

您将采取哪些其他途径。我是WPF和编程的新手,我很想学习。

- Building a CAD program in WPF:

I want to build a CAD program that will have 10000 LINE objects at a time. I'm using LineGeomery class for drawing lines that are added to a Canvas. I have implemented Zoom and Pan and the performance is great so far.

Only one major disappointment:

The Thickness of the lines gets scaled while zooming. I have tried to Bind the Thickness property of the lines to a factor to keep them unchanged, This works but reduces the performance dramatically while zooming. Clearing and drawing new lines with new thickness on MouseWheel is out of the question as well. This one too reduces performance and is not practical in the current method.

- Now what solutions I have?


- Stick with the current method and ignore the change in Thickness
- Do the whole job in GDI+
- Host GDI in WPF
- Use WPF Viewport3D (Will the LineThickness be invariant there?)

- Other solutions?
What other paths you would take. I'm new to WPF and programming and I'm eager to learn.

推荐答案

这篇关于在WPF中构建CAD程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆