Portability | GHC |
---|---|
Stability | unstable |
Maintainer | stephen.tetley@gmail.com |
MicroPrints
- type DrawWordF = (Int, Double) -> (Double, Double) -> RGBi -> DGraphicF
- data MicroPrintConfig = MicroPrintConfig {}
- greekF :: DrawWordF
- borderedF :: Double -> DrawWordF
- drawMicroPrint :: MicroPrintConfig -> ([Tile], Height) -> Maybe DPicture
- renderMicroPrint :: MicroPrintConfig -> MicroPrint a -> Maybe DPicture
- renderMicroPrintU :: MicroPrintConfig -> MicroPrint a -> DPicture
- data MicroPrint a
- data Tile
- type Height = Int
- linebreak :: MicroPrint ()
- setRGB :: RGBi -> MicroPrint ()
- char :: MicroPrint ()
- space :: MicroPrint ()
Re-export all MicroPrint.Render
data MicroPrintConfig Source
Style properties for micro-print drawing.
MicroPrintConfig | |
|
ReaderM RenderMonad MicroPrintConfig |
drawMicroPrint :: MicroPrintConfig -> ([Tile], Height) -> Maybe DPictureSource
Top level rendering functions
renderMicroPrint :: MicroPrintConfig -> MicroPrint a -> Maybe DPictureSource
Build a picture from a MicroPrint.
This function returns Nothing if the picture is empty.
renderMicroPrintU :: MicroPrintConfig -> MicroPrint a -> DPictureSource
Build a picture from a MicroPrint - unsafe version.
This function throws a runtime error if the picture is empty.
Re-export some from MicroPrint.DrawMonad
data MicroPrint a Source
Build a microprint within a monad...
Drawings are made in a teletype fashion emitting a character, space or line-break at each step.
linebreak :: MicroPrint ()Source
Emit a linebreak in the output.
setRGB :: RGBi -> MicroPrint ()Source
Change the current drawing colour.
Note - it is permissible to change colour mid-word, but this is the same as having a no-space break.
Draw a character - note in the microprint, characters will be concatenated together to make a word.
Draw a space.