Shape renderers for node drawing.
Each function draws a specific node shape onto a Boxart.Canvas,
returning the updated canvas. Shapes are drawn with box-drawing characters
from the given charset and labels centered inside.
Summary
Functions
Draws an asymmetric (flag) shape: >text].
Draws a circle with ◯ markers at top/bottom center.
Draws a cylinder (database) shape with double top border.
Draws a diamond (decision) shape with ◇ markers at top/bottom center.
Draws a double circle (concentric rounded borders).
Draws an end state: bullseye (◉).
Draws a fork/join bar: solid thick block.
Draws a hexagon shape.
Draws a parallelogram leaning right: /text/.
Draws a parallelogram leaning left: \text.
Draws a rectangular box with the label centered.
Draws a box with rounded corners.
Dispatches to the appropriate shape renderer.
Draws a stadium (pill) shape with parenthesized sides.
Draws a start state: filled circle (●).
Draws a subroutine (double-bordered) box.
Draws a trapezoid: /text\ — top corners slant inward.
Draws an inverted trapezoid: \text/ — bottom corners slant inward.
Types
Functions
@spec draw_asymmetric( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws an asymmetric (flag) shape: >text].
@spec draw_circle( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a circle with ◯ markers at top/bottom center.
╭────◯────╮
│ text │
╰────◯────╯
@spec draw_cylinder( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a cylinder (database) shape with double top border.
╭──────────╮
╰──────────╯
│ text │
╰──────────╯
@spec draw_diamond( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a diamond (decision) shape with ◇ markers at top/bottom center.
┌────◇────┐
│ decide? │
└────◇────┘
@spec draw_double_circle( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a double circle (concentric rounded borders).
@spec draw_end_state( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws an end state: bullseye (◉).
@spec draw_fork_join( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a fork/join bar: solid thick block.
@spec draw_hexagon( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a hexagon shape.
/────────\
│ text │
\────────/
@spec draw_parallelogram( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a parallelogram leaning right: /text/.
@spec draw_parallelogram_alt( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a parallelogram leaning left: \text.
@spec draw_rectangle( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a rectangular box with the label centered.
┌──────────┐
│ text │
└──────────┘
@spec draw_rounded( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a box with rounded corners.
╭──────────╮
│ text │
╰──────────╯
@spec draw_shape( Boxart.Canvas.t(), shape(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Dispatches to the appropriate shape renderer.
@spec draw_stadium( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a stadium (pill) shape with parenthesized sides.
╭──────────╮
( text )
╰──────────╯
@spec draw_start_state( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a start state: filled circle (●).
@spec draw_subroutine( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a subroutine (double-bordered) box.
┌─┬──────┬─┐
│ │ text │ │
└─┴──────┴─┘
@spec draw_trapezoid( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws a trapezoid: /text\ — top corners slant inward.
@spec draw_trapezoid_alt( Boxart.Canvas.t(), integer(), integer(), integer(), integer(), String.t(), Boxart.Charset.t() ) :: Boxart.Canvas.t()
Draws an inverted trapezoid: \text/ — bottom corners slant inward.