wumpus-drawing-0.7.0: High-level drawing objects built on Wumpus-Basic.

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



Build relative paths monadically.

** WARNING ** this module is an experiment, and may change significantly or even be dropped from future revisions.



data GenPathSpec st u a Source

Note - a path spec has an immutable start point like LocDrawing.

Effectively a path is draw in a local coordinate system with (0,0) as the origin.

data Vamp u Source



runGenPathSpec :: InterpretUnit u => st -> PathMode -> GenPathSpec st u a -> LocImage u (a, st, AbsPath u)Source

runPivot :: (Floating u, InterpretUnit u) => PathSpec u a -> PathSpec u a -> LocGraphic uSource

Form a "pivot path" drawing from two path specifications. The start point of the drawing is the pivot formed by joining the paths.

penline :: InterpretUnit u => Vec2 u -> GenPathSpec st u ()Source

Extend the path with a line, drawn by the pen.

pencurve :: InterpretUnit u => Vec2 u -> Vec2 u -> Vec2 u -> GenPathSpec st u ()Source

Extend the path with a curve, drawn by the pen.

updatePen :: DrawingContextF -> GenPathSpec st u ()Source

Note - updates the pen but doesn't draw, the final path will be drawing with the last updated context.