Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | Stephen 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 RelBuild u a
- runRelBuild :: (Floating u, InterpretUnit u) => RelBuild u a -> (RelPath u, LocGraphic u)
- execRelBuild :: (Floating u, InterpretUnit u) => RelBuild u a -> LocGraphic u
- evalRelBuild :: (Floating u, InterpretUnit u) => RelBuild u a -> RelPath u
- execPivot :: (Floating u, InterpretUnit u) => RelBuild u a -> LocGraphic u
- tip :: RelBuild u (Vec2 u)
- line :: Floating u => Vec2 u -> RelBuild u ()
- curve :: Floating u => Vec2 u -> Vec2 u -> Vec2 u -> RelBuild u ()
- move :: (Floating u, InterpretUnit u) => Vec2 u -> RelBuild u ()
- insert :: Num u => LocGraphic u -> RelBuild u ()
- vamp :: (Floating u, Ord u, Tolerance u, InterpretUnit u) => Vamp u -> RelBuild u ()
- cycle :: (Floating u, InterpretUnit u) => RelBuild u ()
- setIncline :: Radian -> RelBuild u ()
- pivot :: RelBuild u ()
- pen_colour :: (Floating u, InterpretUnit u) => RGBi -> RelBuild u ()
- pen_width :: (Floating u, InterpretUnit u) => Double -> RelBuild u ()
- hline :: Floating u => u -> RelBuild u ()
- vline :: Floating u => u -> RelBuild u ()
- aline :: Floating u => Radian -> u -> RelBuild u ()
- hmove :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- vmove :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- amove :: (Floating u, InterpretUnit u) => Radian -> u -> RelBuild u ()
- line_up :: Floating u => u -> RelBuild u ()
- line_down :: Floating u => u -> RelBuild u ()
- line_left :: Floating u => u -> RelBuild u ()
- line_right :: Floating u => u -> RelBuild u ()
- line_up_left :: Floating u => u -> RelBuild u ()
- line_up_right :: Floating u => u -> RelBuild u ()
- line_down_left :: Floating u => u -> RelBuild u ()
- line_down_right :: Floating u => u -> RelBuild u ()
- line_north :: Floating u => u -> RelBuild u ()
- line_south :: Floating u => u -> RelBuild u ()
- line_east :: Floating u => u -> RelBuild u ()
- line_west :: Floating u => u -> RelBuild u ()
- line_northeast :: Floating u => u -> RelBuild u ()
- line_northwest :: Floating u => u -> RelBuild u ()
- line_southeast :: Floating u => u -> RelBuild u ()
- line_southwest :: Floating u => u -> RelBuild u ()
- move_up :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_down :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_left :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_right :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_up_left :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_up_right :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_down_left :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_down_right :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_north :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_south :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_east :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_west :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_northeast :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_northwest :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_southeast :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
- move_southwest :: (Floating u, InterpretUnit u) => u -> RelBuild u ()
Documentation
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.
execPivot :: (Floating u, InterpretUnit u) => RelBuild u a -> LocGraphic uSource
setIncline :: Radian -> RelBuild u ()Source
Derived operators
pen_colour :: (Floating u, InterpretUnit u) => RGBi -> RelBuild u ()Source
line_right :: Floating u => u -> RelBuild u ()Source
line_up_left :: Floating u => u -> RelBuild u ()Source
Diagonal lines
line_up_right :: Floating u => u -> RelBuild u ()Source
line_down_left :: Floating u => u -> RelBuild u ()Source
line_down_right :: Floating u => u -> RelBuild u ()Source
line_north :: Floating u => u -> RelBuild u ()Source
line_south :: Floating u => u -> RelBuild u ()Source
line_northeast :: Floating u => u -> RelBuild u ()Source
line_northwest :: Floating u => u -> RelBuild u ()Source
line_southeast :: Floating u => u -> RelBuild u ()Source
line_southwest :: Floating u => u -> RelBuild u ()Source
move_right :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
move_up_left :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
Diagonal moves
move_up_right :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
move_down_left :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
move_down_right :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
move_north :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
move_south :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
move_northeast :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
move_northwest :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
move_southeast :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source
move_southwest :: (Floating u, InterpretUnit u) => u -> RelBuild u ()Source