Crate egui_gdl

Source
Expand description

§Graph UI

This allow to draw in egui a petgraph using a node formatter function (returning a String).

One actual drawback of the implementation is the performances (we could optimize with a cache and a quadtree coordinate system) and the fact that after the “layouting” we don’t have the whole node but just a formatted text (i.e. in case of a network graph, we cannot know if the not correspond to a compromised machine and do extra animation). A solution is to add an id in the layout node text and make a function using that id to associate a rect position and text to a specific node (kind of dirty hack…).

Main things to do:

  • Optimization (cache + quadtree to know which element to draw if collision with the screen area),
  • Node association to layout graph (either layout fork or id in text solution).

Modules§

graph_elements
Graph elements
transform
Graph transform

Structs§

Graph
Store a drawable representation of a graph, after a layout pass (positioning was done).