Portability | GHC with TypeFamilies and more |
---|---|
Stability | highly unstable |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Drawing attributes
** WARNING ** - this module needs systematic naming schemes both for update functions (primaryColour, ...) and for synthesized selectors (e.g. lowerxHeight). The current names will change.
- data DrawingContext = DrawingContext {}
- standardContext :: FontSize -> DrawingContext
- textAttr :: DrawingContext -> (RGBi, FontAttr)
- markHeight :: FromPtSize u => DrawingContext -> u
- lowerxHeight :: FromPtSize u => DrawingContext -> u
- textDimensions :: FromPtSize u => String -> DrawingContext -> (u, u)
- thick :: DrawingContext -> DrawingContext
- ultrathick :: DrawingContext -> DrawingContext
- thin :: DrawingContext -> DrawingContext
- dashPattern :: DashPattern -> DrawingContext -> DrawingContext
- fontsize :: Int -> DrawingContext -> DrawingContext
- fontface :: FontFace -> DrawingContext -> DrawingContext
- swapColours :: DrawingContext -> DrawingContext
- primaryColour :: RGBi -> DrawingContext -> DrawingContext
- secondaryColour :: RGBi -> DrawingContext -> DrawingContext
Drawing context
textAttr :: DrawingContext -> (RGBi, FontAttr)Source
markHeight :: FromPtSize u => DrawingContext -> uSource
A Mark is consider to be the height of a lowercase letter in the current font.
Note better to use xlowerHeight
lowerxHeight :: FromPtSize u => DrawingContext -> uSource
Height of a lower case 'x' in Courier.
'x' has no ascenders or descenders.
textDimensions :: FromPtSize u => String -> DrawingContext -> (u, u)Source
textDimensions : text -> DrawingContext -> (width,height)
Modifiers
Line widths
Dash Pattern
Font properties
fontsize :: Int -> DrawingContext -> DrawingContextSource