Portability | GHC |
---|---|
Stability | unstable |
Maintainer | stephen.tetley@gmail.com |
Flexible text type, composable with pretty-print
style
operators.
Direction zero (left-to-right) only.
- data Doc u
- type TextFrame u = RectAddress -> LocImage u (BoundingBox u)
- render :: (Real u, Floating u, InterpretUnit u) => FontFamily -> Doc u -> RectAddress -> LocImage u (BoundingBox u)
- leftAlign :: [Doc u] -> Doc u
- centerAlign :: [Doc u] -> Doc u
- rightAlign :: [Doc u] -> Doc u
- blank :: Doc u
- space :: Doc u
- string :: String -> Doc u
- escaped :: EscapedText -> Doc u
- int :: InterpretUnit u => Int -> Doc u
- integer :: InterpretUnit u => Integer -> Doc u
- float :: (RealFloat a, InterpretUnit u) => a -> Doc u
- ffloat :: (RealFloat a, InterpretUnit u) => Maybe Int -> a -> Doc u
- (<>) :: Doc u -> Doc u -> Doc u
- (<+>) :: Doc u -> Doc u -> Doc u
- vcatl :: Doc u -> Doc u -> Doc u
- vcatc :: Doc u -> Doc u -> Doc u
- vcatr :: Doc u -> Doc u -> Doc u
- lfill :: u -> Doc u -> Doc u
- rfill :: u -> Doc u -> Doc u
- centerfill :: u -> Doc u -> Doc u
- fontColour :: RGBi -> Doc u -> Doc u
- textSize :: Int -> Doc u -> Doc u
- bold :: Doc u -> Doc u
- italic :: Doc u -> Doc u
- boldItalic :: Doc u -> Doc u
- strikethrough :: Doc u -> Doc u
- underline :: Doc u -> Doc u
- highlight :: (Fractional u, InterpretUnit u) => RGBi -> Doc u -> Doc u
Documentation
Space is the width of a space in the current font - it is filled in during interpretation.
type TextFrame u = RectAddress -> LocImage u (BoundingBox u)Source
TextFrame is the result Graphic made from rendering multiple lines of DocText.
render :: (Real u, Floating u, InterpretUnit u) => FontFamily -> Doc u -> RectAddress -> LocImage u (BoundingBox u)Source
centerAlign :: [Doc u] -> Doc uSource
rightAlign :: [Doc u] -> Doc uSource
escaped :: EscapedText -> Doc uSource
int :: InterpretUnit u => Int -> Doc uSource
integer :: InterpretUnit u => Integer -> Doc uSource
float :: (RealFloat a, InterpretUnit u) => a -> Doc uSource
Specialized version of ffloat
- the answer is always
rendered at "full precision".
ffloat :: (RealFloat a, InterpretUnit u) => Maybe Int -> a -> Doc uSource
This is equivalent to showFFloat
in the Numeric module.
Like showFFloat
, the answer is rendered to supplied
precision. Nothing
indicated full precision.
centerfill :: u -> Doc u -> Doc uSource
fontColour :: RGBi -> Doc u -> Doc uSource
boldItalic :: Doc u -> Doc uSource
strikethrough :: Doc u -> Doc uSource
highlight :: (Fractional u, InterpretUnit u) => RGBi -> Doc u -> Doc uSource
Background fill.