Module grid

Module grid 

Source
Expand description

Core BrailleGrid data structure for terminal braille rendering.

This module provides the central BrailleGrid type and Color struct for high-resolution terminal graphics using Unicode braille characters.

§Overview

Each terminal cell displays a braille character (U+2800-U+28FF) representing a 2×4 dot matrix. This gives 4× the resolution of ASCII art.

§Examples

use dotmax::BrailleGrid;

// Create 80×24 grid (= 160×96 dot resolution)
let mut grid = BrailleGrid::new(80, 24).unwrap();

// Set individual dots
grid.set_dot(0, 0).unwrap();  // Top-left
grid.set_dot(159, 95).unwrap(); // Bottom-right

// Get the grid dimensions
let (width, height) = grid.dimensions();
assert_eq!(width, 80);
assert_eq!(height, 24);

§Extraction Note

This module was extracted from the crabmusic project. See ADR 0005 (Copy-Refactor-Test strategy) for details.

Structs§

BrailleGrid
High-resolution grid using Braille characters
Color
RGB color representation for braille cells

Enums§

BrailleDot
Braille dot positions

Functions§

dots_to_char
Convert dot pattern to Braille Unicode character