本文介绍了最好的画布在wxPython绘图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须绘制构成物理网络的拓扑模型的元素的图。将有节点和拱门,后者可以是单向的或双向的。

I have to draw a graph of elements composing a topological model of a physical network. There would be nodes and arches, and the latter could be unidirectional or bidirectional.

我想捕获节点和拱门的点击事件并显示其属性)和节点的拖动事件(移动它们)和拱门(连接或断开元素)。

I would like to capture the clicking events for the nodes and the arches (to select the element and show its properties somewhere), and the dragging events for the nodes (to move them around) and arches (to connect or disconnect elements).

我做了一些研究,我已将选择范围缩小为(对象图形库)和。

I've done some research and I've narrowed the alternatives down to OGL (Object Graphics Library) and FloatCanvas. I would not like to go down to the DrawingContext, but it is not discarded if necessary.

你会选择哪个画布选项?

Which canvas option would you choose?

推荐答案

我试过FloatCanvas,虽然有很多工作,让一切工作。我已经设法通过鼠标交互的事情,如连接,运动,自动重新连接的情况下,等。

I've tried FloatCanvas, although there has been a lot of work to get everything to work. I've managed to get through mouse interaction things like connectivity, movement, automatic reconnection in case of movement, etc.

FloatCanvas也是相当不错的性能和视觉结果。抗锯齿()()也可以在必要时改进。

FloatCanvas is also quite nice in terms of performance and visual results. Anti-aliasing (1) (2) is also possible to improve them if necessary.

这篇关于最好的画布在wxPython绘图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 23:29