wumpus-basic-0.15.0: Basic objects and system code built on Wumpus-Core.

Stabilityhighly unstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>




Drawing attributes

** WARNING ** - The drawing context modules need systematic naming schemes both for update functions (primaryColour, ...) and for synthesized selectors (e.g. lowerxHeight). The current names in QueryDC and UpdateDC are expected to change.


Drawing context

data DrawingContext Source

DrawingContext - the "graphics state" of Wumpus-Basic. DrawingContext is operated on within a Reader monad rather than a State monad so "updates" are delineated within a local operation (called localize in Wumpus), rather than permanent until overridden as per set of a State monad.

Note - round_corner_factor is only accounted for by some graphic objects (certain Path objects and Shapes in Wumpus-Drawing for instance). There many be many objects that ignore it and are drawn only with angular corners.

Also note - in contrast to most other drawing objects in Wumpus, none of the measurement values are parameteric - usually notated with the type variable u in Wumpus. This is so Wumpus can (potentially) support different units e.g. centimeters rather than just Doubles (represening printers points), though adding support for other units has a very low priority.

type DrawingContextF = DrawingContext -> DrawingContextSource

Type synonym for DrawingContext update functions.

data TextMargin Source

The unit of Margin is always Double representing Points, e.g. 1.0 is 1 Point. Margins are not scaled relative to the current font size.

The default value is 2 point.



DrawingCtxM (reader) monad

asksDC :: DrawingCtxM m => (DrawingContext -> a) -> m aSource

Project a value out of a context.

Glyph metrics