Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Safe Haskell | Safe-Infered |
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
- type PathSpec u a = GenPathSpec () u a
- data Vamp u = Vamp {
- vamp_move :: Vec2 u
- vamp_conn :: ConnectorGraphic u
- runGenPathSpec :: InterpretUnit u => st -> PathMode -> GenPathSpec st u a -> LocImage u (a, st, AbsPath u)
- execGenPathSpec :: InterpretUnit u => st -> PathMode -> GenPathSpec st u a -> LocImage u (st, AbsPath u)
- evalGenPathSpec :: InterpretUnit u => st -> PathMode -> GenPathSpec st u a -> LocImage u (a, AbsPath u)
- stripGenPathSpec :: InterpretUnit u => st -> PathMode -> GenPathSpec st u a -> LocQuery u (a, st, AbsPath u)
- runPathSpec :: InterpretUnit u => PathMode -> PathSpec u a -> LocImage u (a, AbsPath u)
- runPathSpec_ :: InterpretUnit u => PathMode -> PathSpec u a -> LocGraphic u
- runPivot :: (Floating u, InterpretUnit u) => PathSpec u a -> PathSpec u a -> LocGraphic u
- penline :: InterpretUnit u => Vec2 u -> GenPathSpec st u ()
- pencurve :: InterpretUnit u => Vec2 u -> Vec2 u -> Vec2 u -> GenPathSpec st u ()
- breakPath :: InterpretUnit u => GenPathSpec st u ()
- hpenline :: InterpretUnit u => u -> GenPathSpec st u ()
- vpenline :: InterpretUnit u => u -> GenPathSpec st u ()
- apenline :: (Floating u, InterpretUnit u) => Radian -> u -> GenPathSpec st u ()
- penlines :: InterpretUnit u => [Vec2 u] -> GenPathSpec st u ()
- pathmoves :: InterpretUnit u => [Vec2 u] -> GenPathSpec st u ()
- vamp :: InterpretUnit u => Vamp u -> GenPathSpec st u ()
- cycleSubPath :: DrawMode -> GenPathSpec st u ()
- updatePen :: DrawingContextF -> GenPathSpec st u ()
Documentation
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.
Monad (GenPathSpec st u) | |
Functor (GenPathSpec st u) | |
Applicative (GenPathSpec st u) | |
UserStateM (GenPathSpec st u) | |
InterpretUnit u => InsertlM (GenPathSpec st u) | |
InterpretUnit u => LocationM (GenPathSpec st u) | |
InterpretUnit u => CursorM (GenPathSpec st u) | |
DrawingCtxM (GenPathSpec st u) | |
Monoid a => Monoid (GenPathSpec st u a) |
type PathSpec u a = GenPathSpec () u aSource
runGenPathSpec :: InterpretUnit u => st -> PathMode -> GenPathSpec st u a -> LocImage u (a, st, AbsPath u)Source
execGenPathSpec :: InterpretUnit u => st -> PathMode -> GenPathSpec st u a -> LocImage u (st, AbsPath u)Source
evalGenPathSpec :: InterpretUnit u => st -> PathMode -> GenPathSpec st u a -> LocImage u (a, AbsPath u)Source
stripGenPathSpec :: InterpretUnit u => st -> PathMode -> GenPathSpec st u a -> LocQuery u (a, st, AbsPath u)Source
runPathSpec :: InterpretUnit u => PathMode -> PathSpec u a -> LocImage u (a, AbsPath u)Source
runPathSpec_ :: InterpretUnit u => PathMode -> PathSpec u a -> LocGraphic uSource
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.
breakPath :: InterpretUnit u => GenPathSpec st u ()Source
hpenline :: InterpretUnit u => u -> GenPathSpec st u ()Source
vpenline :: InterpretUnit u => u -> GenPathSpec st u ()Source
apenline :: (Floating u, InterpretUnit u) => Radian -> u -> GenPathSpec st u ()Source
penlines :: InterpretUnit u => [Vec2 u] -> GenPathSpec st u ()Source
pathmoves :: InterpretUnit u => [Vec2 u] -> GenPathSpec st u ()Source
vamp :: InterpretUnit u => Vamp u -> GenPathSpec st u ()Source
cycleSubPath :: DrawMode -> GenPathSpec st u ()Source
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.