redrawing to a device context in wxPython

Duncan Smith buzzard at urubu.freeserve.co.uk
Sat Jan 26 23:13:24 EST 2002


I am drawing graphs (nodes and edges) to a wxPanel.  But I want to redraw
local parts of the graph structure to reflect the changes made to the graph
by an algorithm running in the background.  Obviously I want this to be as
efficient as possible, and I'd rather not redraw the whole graph on each
iteration of the algorithm.  Is it a question of redrawing the parts I want
to get rid of in the background colour of the panel, or is there a 'cuter'
way of doing this?

Any advice on how to go about laying out graphs would also be appreciated.
I sometimes have the structure but no coordinates for the nodes.  So I could
do with an algorithm for setting it out in a pleasing (to the eye) way.
(For the most part the graphs will be directed and acyclic.)  Thanks in
advance.

Duncan





More information about the Python-list mailing list