| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Graphics.Rendering.MiniTypeset.Common
Description
Common data types and functions
Synopsis
- data BasicStyle
- = Regular
- | Bold
- | Italic
- | BoldItalic
- newtype Height = Height Int
- data Col = Col !Float !Float !Float
- colToTriple :: Col -> (Float, Float, Float)
- tripleToCol :: (Float, Float, Float) -> Col
- data HAlign
- data VAlign
- data WhichDelim
- data Delimiter
- = Paren
- | Square
- | Brace
- | Angle
- | Ceil
- | Floor
- | Top
- | Bottom
- | Guillemet
- | AngleQuote
- | VertSingle
- | VertDouble
- | Tortoise
- delimiterChars :: Delimiter -> (Char, Char)
- data Pos = Pos !Double !Double
- posToPair :: Pos -> (Double, Double)
- pairToPos :: (Double, Double) -> Pos
- class Translate a where
- data Margin = Margin {
- _leftMargin :: !Double
- _rightMargin :: !Double
- _topMargin :: !Double
- _bottomMargin :: !Double
- mapAccumM :: Monad m => (a -> b -> m (a, c)) -> a -> [b] -> m (a, [c])
Font-related things
data BasicStyle Source #
Basic variations in a typeface (font family)
Constructors
| Regular | |
| Bold | |
| Italic | |
| BoldItalic |
Instances
| Eq BasicStyle Source # | |
Defined in Graphics.Rendering.MiniTypeset.Common | |
| Ord BasicStyle Source # | |
Defined in Graphics.Rendering.MiniTypeset.Common Methods compare :: BasicStyle -> BasicStyle -> Ordering # (<) :: BasicStyle -> BasicStyle -> Bool # (<=) :: BasicStyle -> BasicStyle -> Bool # (>) :: BasicStyle -> BasicStyle -> Bool # (>=) :: BasicStyle -> BasicStyle -> Bool # max :: BasicStyle -> BasicStyle -> BasicStyle # min :: BasicStyle -> BasicStyle -> BasicStyle # | |
| Show BasicStyle Source # | |
Defined in Graphics.Rendering.MiniTypeset.Common Methods showsPrec :: Int -> BasicStyle -> ShowS # show :: BasicStyle -> String # showList :: [BasicStyle] -> ShowS # | |
Font height in pixels
Colors
Alignment
Horizontal alignment
Constructors
| AlignLeft | |
| AlignRight |
Vertical alignment
Constructors
| AlignTop | |
| AlignBottom |
Delimiters
data WhichDelim Source #
Constructors
| LeftDelim | |
| RightDelim |
Instances
| Eq WhichDelim Source # | |
Defined in Graphics.Rendering.MiniTypeset.Common | |
| Ord WhichDelim Source # | |
Defined in Graphics.Rendering.MiniTypeset.Common Methods compare :: WhichDelim -> WhichDelim -> Ordering # (<) :: WhichDelim -> WhichDelim -> Bool # (<=) :: WhichDelim -> WhichDelim -> Bool # (>) :: WhichDelim -> WhichDelim -> Bool # (>=) :: WhichDelim -> WhichDelim -> Bool # max :: WhichDelim -> WhichDelim -> WhichDelim # min :: WhichDelim -> WhichDelim -> WhichDelim # | |
| Show WhichDelim Source # | |
Defined in Graphics.Rendering.MiniTypeset.Common Methods showsPrec :: Int -> WhichDelim -> ShowS # show :: WhichDelim -> String # showList :: [WhichDelim] -> ShowS # | |
A delimiter type
Constructors
| Paren | parentheses (can stretch) |
| Square | square brackets (can stretch) |
| Brace | curly braces (can stretch) |
| Angle | angle brackets |
| Ceil | ceiling |
| Floor | floor |
| Top | top corners |
| Bottom | bottom corners |
| Guillemet | guillemet or french quote |
| AngleQuote | single quillemet or angle quote |
| VertSingle | vertical line (can stretch) |
| VertDouble | double vertical line (can stretch) |
| Tortoise | tortoise brackets |
Instances
| Eq Delimiter Source # | |
| Ord Delimiter Source # | |
Defined in Graphics.Rendering.MiniTypeset.Common | |
| Show Delimiter Source # | |
Positions
A position. We use screen-space coordinates here (so the top-left corner of the screen is the origin, and the vertical coordinate increases downwards).
It is monomorphic so that GHC can optimize it better.
Margins
A margin definition
Constructors
| Margin | |
Fields
| |