wumpus-microprint-0.7.0: Microprints - "greek-text" pictures.







Re-export all MicroPrint.Render

type DrawWordF = (Int, Double) -> (Double, Double) -> RGBi -> DLocGraphicSource

DrawWordF : (num_chars, char_unit_width) * (full_width, full_height) -> rgb -> DGraphicF

The libraries currently provides two styles - greekF and borderedF.

data MicroPrintConfig Source

Style properties for micro-print drawing.

greekF :: DrawWordFSource

Draw the word as a single coloured rectangle.

borderedF :: DrawWordFSource

Draw the word as a coloured rectangle, with a border grid.

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.

data Tile Source


Space Int 
Word RGBi Int 

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.

char :: MicroPrint ()Source

Draw a character - note in the microprint, characters will be concatenated together to make a word.

space :: MicroPrint ()Source

Draw a space.