tart-0.3: Terminal Art
Safe HaskellSafe-Inferred
LanguageHaskell2010

Tart.Canvas

Synopsis

Documentation

data CanvasData Source #

Instances

Instances details
Binary CanvasData Source # 
Instance details

Defined in Tart.Canvas

Methods

put :: CanvasData -> Put

get :: Get CanvasData

putList :: [CanvasData] -> Put

canvasFromData :: CanvasData -> IO (Either String Canvas) Source #

newCanvas :: (Int, Int) -> IO Canvas Source #

canvasSize :: Canvas -> (Int, Int) Source #

canvasSetPixel :: Canvas -> (Int, Int) -> Char -> Attr -> IO Canvas Source #

canvasSetMany :: Canvas -> [((Int, Int), Char, Attr)] -> IO Canvas Source #

canvasGetPixel :: Canvas -> (Int, Int) -> (Char, Attr) Source #

resizeFrom :: Canvas -> (Int, Int) -> IO Canvas Source #

prettyPrintCanvas :: Bool -> [Canvas] -> Text Source #

merge :: Canvas -> Canvas -> IO (Canvas, [((Int, Int), (Char, Attr))]) Source #

canvasLayersToImage :: [Canvas] -> Image Source #

Create a Vty image from a list of canvas layers, with the topmost layer being the first canvas in the list. A pixel in the final image is set by looking for the first non-blank pixel in the canvas list, starting at the beginning.

The result will be as high as the least tall input canvas, and as wide as the least wide input canvas.

normalizeAttr :: Char -> Attr -> Attr Source #