Skip to main content

Module layout

Module layout 

Source
Expand description

Sugiyama hierarchical graph layout.

This module provides functions for computing hierarchical (layered) layouts of directed graphs using the Sugiyama algorithm via the rust-sugiyama crate.

The layout API uses f64 coordinates because the underlying rust-sugiyama crate operates in f64. The rest of this crate uses f32 (matching Slint), so callers should convert with as f32 when applying positions back to nodes.

Requires the layout feature to be enabled.

Structs§

NodePosition
A positioned node returned by sugiyama_layout.
SugiyamaConfig
Configuration for the Sugiyama layout algorithm.

Enums§

Direction
Layout direction for the Sugiyama algorithm.

Functions§

sugiyama_layout
Compute Sugiyama hierarchical layout positions.
sugiyama_layout_from_cache
Compute Sugiyama layout using data from a GeometryCache.