The elementary base types and classes.
- type family MonUnit m :: *
- data UNil u = UNil
- ureturn :: Monad m => m (UNil u)
- class ScalarUnit a where
- class Num u => InterpretUnit u where
- dinterpF :: (Functor t, InterpretUnit u) => FontSize -> t Double -> t u
- normalizeF :: (Functor t, InterpretUnit u) => FontSize -> t u -> t Double
- uconvert1 :: (InterpretUnit u, InterpretUnit u1) => FontSize -> u -> u1
- uconvertF :: (Functor t, InterpretUnit u, InterpretUnit u1) => FontSize -> t u -> t u1
- intraMapPoint :: InterpretUnit u => FontSize -> (DPoint2 -> DPoint2) -> Point2 u -> Point2 u
- intraMapFunctor :: (Functor f, InterpretUnit u) => FontSize -> (f Double -> f Double) -> f u -> f u
- type KernChar u = (u, EscapedChar)
- data DrawStyle
- data ZDeco
- data HAlign
- data VAlign
- data TextHeight
- data Cardinal
- data Direction
- vsum :: Num u => [Vec2 u] -> Vec2 u
- both :: Applicative f => f a -> f b -> f (a, b)
Type family to access the unit parameter of a TraceDrawing or a promoted TraceDrawingT transformer.
Unit phantom type
The empty data type - i.e.
() - wrapped with a phantom unit
UNil rather than
() at the end of sequence of
Many Wumpus objects are usefully constructed in the
do-notation, but due to the need to type their unit
must finish the do-block with:
Non-contextual unit conversion.
Unit interpretation with respect to the current Point size
dinterp an object that gives access to its unit at the
normalize an object that gives access to its unit at the
Convert a scalar value from one unit to another.
Unit convert an object that gives access to its unit at the Functor position.
In practive this will be *all* Image answers.
Draw closed paths.
FILL_STROKE - the path is filled and its edge is stroked.
Decorating with resepct to the Z-order
SUPERIOR - in front.
ANTERIOR - behind.
Horizontal alignment - align to the top, center or bottom.
Vertical alignment - align to the left, center or bottom.
Wumpus distinguishes two use-cases for displaying vertically centered text.
Arbitrary text that is expected to contain lower case letters with descenders, show take the vertical center as the mid-point between the cap height and the descender depth.
Unfortunately, including the descender depth can produce unbalanced results for text which is not expected to have descenders (e.g. numbers within a bordered box), visually this makes the center too high.
Cardinal (compass) positions
An enumeratied type representing the compass positions.
An enumerated type representing horizontal and vertical directions.
Sum a list of Vectors.
Note - this function is a candidate to go in Wumpus-Core, but it will be added when there is an intrinsic reason to to update Core (bug fix, or API change).