Copyright | (c) Pedro Yamada |
---|---|
License | GPL-3 |
Maintainer | Pedro Yamada <tacla.yamada@gmail.com> |
Stability | stable |
Portability | non-portable (not tested on multiple environments) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module enables using UTF-8 braille characters to render drawings onto the console.
- type Canvas = Map (Int, Int) Int
- empty :: Canvas
- frame :: Canvas -> String
- get :: Canvas -> (Int, Int) -> Bool
- set :: Canvas -> (Int, Int) -> Canvas
- unset :: Canvas -> (Int, Int) -> Canvas
- toggle :: Canvas -> (Int, Int) -> Canvas
- fromList :: [(Int, Int)] -> Canvas
- toPs :: (Int, Int) -> (Int, Int)
- toPx :: (Int, Int) -> Int
- pxMap :: Num a => [[a]]
- pxOff :: Num a => a
Documentation
type Canvas = Map (Int, Int) Int
The Canvas type. Represents a canvas, mapping points to their braille "px" codes.
toPs :: (Int, Int) -> (Int, Int)
Helper to convert a coordinate to its corespondent in the bigger braille grid's size
A mapping between local coordinates, inside of a single cell, and each of the braille characters they correspond to (with an offset).