Crate triple_arena_render
source ·Modules§
- Internal structs and functions for experimenting with new rendering backends
Structs§
- Most kinds of graph representations have some notion of directionality, which we term “source-to-sink” or “sink-to-source” edges. By convention, renderers render in order from sources to sinks (and apply some kind of bias or referential transform if there are cycles with no topological ordering). For nodes that store “sink-to-source” edge pointers to other nodes,
sources
should be filled out andsinks
left empty, and vice-versa for “source-to-sink” edges. Arbitrary combinations can also be chosen depending on what ordering is preferred.
Enums§
Traits§
- A trait implemented for the
T
intriple_arena::Arena<P, T>
, intended whereT
is some kind of graph node element.P
corresponds to theP
being used for the arena, and allows renderers to automatically traverse the graph in the arena.
Functions§
- Renders an SVG graph representation of
arena
in a top-down order from sources to sinks. Cycles are broken up by insertingPtr
reference nodes. Iferror_on_invalid_ptr
then this will return an error if an invalidPtr
is encountered, otherwise it will insertPtr
nodes with “(invalid)” appended. - Writes the result of render_to_svg to
out_file