| Maintainer | hapytexeu+gh@gmail.com |
|---|---|
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Dep.Bricks.Utils
Description
A module that is used to render lines, arrows, rasters, etc.
Synopsis
- fromRaster :: Attr -> Raster -> Image
- hline :: Text -> Attr -> Int -> Image
- hline' :: String -> Attr -> Int -> Image
- vline :: Text -> Attr -> Int -> Image
- vline' :: String -> Attr -> Int -> Image
- harrow :: Char -> Text -> Char -> Attr -> Int -> Image
- harrow' :: Char -> String -> Char -> Attr -> Int -> Image
- varrow :: Char -> Text -> Char -> Attr -> Int -> Image
- varrow' :: Char -> String -> Char -> Attr -> Int -> Image
- type Row = String
- type Raster = [Row]
- inRaster :: Attr -> Image -> Image
- inRaster' :: Raster -> Raster
Convert to an Image
Arguments
| :: Attr | The |
| -> Raster | The given list of strings that we want to render. |
| -> Image | The corresponding image by vertically aligning the rows of the raster. |
Convert a given list of strings to an Image where all the
images have the same attribute.
Lines
Arrows
Arguments
| :: Char | The left arrow head. |
| -> Text | The |
| -> Char | The right arrow head. |
| -> Attr | The |
| -> Int | The number characters between the arrow heads (so we are not counting the arrow heads). |
| -> Image | An image that shows a horizontal arrow with a given number of characters in the middle. |
Render a horizontal arrow with the given number of characters between the arrow heads. The Text
in the middle is "cycled".
Arguments
| :: Char | The left arrow head. |
| -> String | The |
| -> Char | The right arrow head. |
| -> Attr | The |
| -> Int | The number characters between the arrow heads (so we are not counting the arrow heads). |
| -> Image | An image that shows a horizontal arrow with a given number of characters in the middle. |
Arguments
| :: Char | The top arrow head. |
| -> Text | The |
| -> Char | The bottom arrow head. |
| -> Attr | The |
| -> Int | The number characters between the arrow heads (so we are not counting the arrow heads). |
| -> Image | An image that shows a vertical arrow with a given number of characters in the middle. |
Render a vertical arrow with the given number of characters between the arrow heads. The Text
in the middle is "cycled".
Arguments
| :: Char | The top arrow head. |
| -> String | The |
| -> Char | The bottom arrow head. |
| -> Attr | The |
| -> Int | The number characters between the arrow heads (so we are not counting the arrow heads). |
| -> Image | An image that shows a vertical arrow with a given number of characters in the middle. |
Type aliasses for rows and rasters
Raster (for Karnaugh cards)
Arguments
| :: Attr | The |
| -> Image | The |
| -> Image | An |
Wrap the given Image in a raster structure with thick borders
and with small lines for the raster image in the middle.