1 unstable release
0.1.0 | Aug 19, 2024 |
---|
#511 in GUI
1.5MB
831 lines
EGUI Graph Drawer Library
Draw graphs with egui, highly extensible. Supports images, animations, interactivity...
Examples
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
lib.rs
:
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).
Dependencies
~10–28MB
~460K SLoC