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

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

Wumpus.Drawing.Paths.Base.RelBuilder

Contents

Description

Build relative paths monadically.

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

Synopsis

Documentation

data RelBuild u a Source

Evaluation is two States - a vector for cummulative displacement and a cummulative path - plus one Writer - a trace of TikZ-like insert commands.

runRelBuild :: (Floating u, InterpretUnit u) => RelBuild u a -> (RelPath u, LocGraphic u)Source

Note - runAbsBuild drops the monadic answer and returns the constructed path and a trace of the inserts and sub-paths.

execRelBuild :: (Floating u, InterpretUnit u) => RelBuild u a -> LocGraphic uSource

Run an RelBuild - return the LocGraphic formed by the pen trace and the insert trace, forget the outline of the path.

evalRelBuild :: (Floating u, InterpretUnit u) => RelBuild u a -> RelPath uSource

Run an RelBuild - return the outline of the path, forget the LocGraphic formed by the pen trace and the insert trace.

curve :: Floating u => Vec2 u -> Vec2 u -> Vec2 u -> RelBuild u ()Source

move :: (Floating u, InterpretUnit u) => Vec2 u -> RelBuild u ()Source

rmoveto is a pen up.

Derived operators

line_up_left :: Floating u => u -> RelBuild u ()Source

Diagonal lines

move_up_left :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source

Diagonal moves