LayoutOptions
Everything that steers one layout run.
Used as Input
0
functions accept this type(+37 nested)
Used as Output
0
functions return this type
Type Definition
166 nested items
struct— Everything that steers one layout run.
compaction:CompactionOptions— Cross-axis compaction. Its iteration counts are in
CompactionTuning.mode:Compaction— Whether the cross axis is compacted after placement. Default
Compaction::None.coords:CoordOptions— Cross-axis placement options.
branch_bands:bool— Keep each branch off the main path in a band of its own, so one branch never slides into
branch_style:BranchStyle— How the two branches of a fork/join block are drawn against each other.
terminal_centering:bool— Centre a first- or last-layer terminal on the weighted median of its neighbours, so it
cycles:CycleOptions— Cycle-breaking options. See
CycleStrategy.strategy:CycleStrategy— Which edges of a cyclic graph are drawn against the flow. Default
variant 1:"leftright"— Layers advance left to right.
variant 2:"topbottom"— Layers advance top to bottom.
effort:Effort— How hard the engine works, as one dial over the iteration counts. Default
variant 1:"fast"— Fewer restarts and sweeps, for interactive relayout of large graphs.
variant 2:"balanced"— The
Tuning counts as given.variant 3:"thorough"— More restarts and sweeps, for a final rendering.
variant 4:struct— Exactly these counts.
labels:LabelOptions— How edge labels are given room, and where in the drawing they end up.
clearance:f64— Clear space a label tries to keep from node boxes, other labels and other edges. Soft: A
placement:LabelPlacement— How a label's final position is chosen. Default
LabelPlacement::Candidates.reservation:LabelReservation— When a layer gap is widened to hold the labels crossing it. Default
limits:Limits— Input size limits.
max_dummies:Option<i64>— Largest accepted routing-waypoint count (one per layer a long edge passes), checked after
max_edges:Option<i64>— Largest accepted edge count.
max_nodes:Option<i64>— Largest accepted node count.
order:OrderOptions— Crossing-minimisation heuristic and group lane budgets.
group_lane_area_percent:u32— How much wider the order axis may get, in percent, when the group bands are stacked into
group_lane_budget_percent:u32— Crossings the lane pass may add to put each group (
crate::Node::group) in a band ofheuristic:OrderHeuristic— Which one-sided heuristic a crossing-minimisation sweep sorts a layer by. Default
routing:Routing— How edges are routed: the style, bundling, and which borders and lanes the ends use.
bundle_parallel:bool— Route parallel edges with the same endpoints as one edge, then split it into offset lanes.
centre_ports:PortCentring— Which nodes have the edge ends on a border packed around its middle. Default
lane_gap:f64— Room reserved per riser in a layer gap. A gap where
k edges change height is widened tomerge_edges:MergeEdges— Which fan-outs and fan-ins
Routing::merge_edges draws on a shared trunk.port_sides:PortSides— How readily an edge end may attach to a perpendicular border (e.g., top or bottom in a
style:RoutingStyle— How edges are drawn between their ports.
seed:u32— Seed for the crossing minimisation's restarts and kicks. The same seed gives the same
seed_mode:SeedMode— How node positions given by the caller (
crate::Node::position) steer a layout. Defaultvariant 1:"placement"— Seeds set the nodes' cross-axis positions, but layering and ordering run from scratch.
variant 2:"structure"— When every node has a seed, read layers and order off the seeds, so filtered views of
self_loops:SelfLoopOptions— How self-loops (
source == target edges) are drawn.gap:f64— Depth step between two loops stacked on one node, so
k loops nest. Default 10, thelabel_gap:f64— Clear space between the outer run of a loop and its own label box. Default 4.
side:LoopSide— Which border of its node a self-loop bumps out of. Default
LoopSide::Auto.size:f64— How far the innermost loop reaches beyond the node's border. Default 15, the
spacing:Spacing— Gaps and clearances, all in px.
bundle_lane_gap:f64— Clear space between the strokes of two lanes in one parallel-edge bundle. Default 8.
compound_header:f64— Extra room along a compound's top border, on top of
Spacing::compound_padding, for acompound_padding:f64— Room between a compound's border and its children's drawing, on every side
dummy_gap:f64— Between a routing track and its order-axis neighbour. Default 30, tighter than
node_gapedge_label_margin:f64— Extra layer gap beyond an edge label's own layer-axis extent, so the edge has room for
edge_label_stack_gap:f64— Clear space between two edge labels stacked in one layer gap. Default 6.
isolated_gap:f64— Padding around each cell of the grid that holds edgeless nodes, and the gap between that
isolated_max_columns:i64<uint>— Column cap for the isolated-node grid. Further nodes wrap into new rows. Default 24.
layer_gap:f64— Between layer columns, on the layer axis. Default 54.
node_gap:f64— Between two real nodes in one layer, on the order axis. Default 46.
port_gap:f64— Minimum port-to-port separation along one border. Default 18.
port_stroke_clear:f64— Clear space between the strokes of two adjacent ports, on top of half of each stroke's
reroute_node_gap:f64— Order-axis gap
crate::reroute() uses instead of Spacing::node_gap. Default 46.self_loop_gap:f64— Depth step between two self-loops stacked on one node border. Default 10, also the
stub:f64— Straight run out of a port before the first bend. Default 15.
tuning:Tuning— Iteration counts, budgets and thresholds, tuned on the fixture corpus.
compaction:CompactionTuning— Iteration counts of
Compaction::Priority (Tuning::compaction).coords:CoordTuning— Iteration counts and budgets of the coordinate phases (
Tuning::coords).labels:LabelTuning— The candidate positions and rounds of label placement (
Tuning::labels).order:OrderTuning— How hard the crossing-minimisation and lane phases work (
Tuning::order).routing:RoutingTuning— The router's repair constants (
Tuning::routing).wrap:WrapTuning— When and how far a drawing is wrapped once
WrapOptions::viewport_aspect asks for itwrap:WrapOptions— Wrapping a long drawing into rows to fit a viewport shape. When a wrap pays is in
viewport_aspect:f64— Width over height of the viewport the drawing is shown in. Default
0, never wrap.Example JSON Value
{}