Draw orchestrator: combines layout, routing, and rendering into final output.
Drawing order (back to front):
- Subgraph borders (background)
- Nodes (boxes)
- Edge lines
- Edge corners
- Arrow heads
- T-junctions (where edges leave nodes)
- Edge labels
- Subgraph labels
Summary
Types
@type render_opts() :: [ charset: :unicode | :ascii, padding_x: non_neg_integer(), padding_y: non_neg_integer(), gap: non_neg_integer() ]
Functions
@spec render_graph(Boxart.Graph.t(), render_opts()) :: String.t()
Renders a graph to a string.
Returns "" for empty graphs.
@spec render_graph_canvas(Boxart.Graph.t(), render_opts()) :: Boxart.Canvas.t() | nil
Renders a graph and returns the Canvas struct.
Returns nil for empty graphs.