Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Canvas
- data CanvasData
- canvasFromData :: CanvasData -> IO (Either String Canvas)
- canvasToData :: Canvas -> CanvasData
- newCanvas :: (Int, Int) -> IO Canvas
- canvasSize :: Canvas -> (Int, Int)
- canvasSetPixel :: Canvas -> (Int, Int) -> Char -> Attr -> IO Canvas
- canvasSetMany :: Canvas -> [((Int, Int), Char, Attr)] -> IO Canvas
- canvasGetPixel :: Canvas -> (Int, Int) -> (Char, Attr)
- resizeFrom :: Canvas -> (Int, Int) -> IO Canvas
- prettyPrintCanvas :: Bool -> [Canvas] -> String
- merge :: Canvas -> Canvas -> IO (Canvas, [((Int, Int), (Char, Attr))])
- clearCanvas :: Canvas -> IO Canvas
- canvasFromText :: String -> IO Canvas
- canvasLayersToImage :: [Canvas] -> Image
- normalizeAttr :: Char -> Attr -> Attr
Documentation
data CanvasData Source #
canvasFromData :: CanvasData -> IO (Either String Canvas) Source #
canvasToData :: Canvas -> CanvasData 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.