Raxol.Plugins.Visualization.DrawingUtils (Raxol v0.2.0)
View SourceUtility functions for drawing basic shapes and text onto a cell grid. Used by visualization renderers.
Summary
Functions
Draws box borders onto an existing grid.
Draws a simple box with optional text centered inside. Returns a grid of cells. Expects bounds map: %{width: w, height: h}.
Draws text onto a grid at a specific coordinate. Truncates if text exceeds grid width. Uses optional style.
Draws text centered horizontally on a specific row in the grid. Truncates text if it exceeds grid width.
Safely gets a cell from the grid. Returns nil if coordinates are out of bounds.
Safely puts a cell into the grid (list of lists). Handles out-of-bounds coordinates gracefully (no-op).
Functions
Draws box borders onto an existing grid.
Draws a simple box with optional text centered inside. Returns a grid of cells. Expects bounds map: %{width: w, height: h}.
Draws text onto a grid at a specific coordinate. Truncates if text exceeds grid width. Uses optional style.
Draws text centered horizontally on a specific row in the grid. Truncates text if it exceeds grid width.
Safely gets a cell from the grid. Returns nil if coordinates are out of bounds.
Safely puts a cell into the grid (list of lists). Handles out-of-bounds coordinates gracefully (no-op).