wumpus-basic-0.4.0: Common drawing utilities built on wumpus-core.Source codeContentsIndex
Wumpus.Basic.Monads.Drawing
PortabilityGHC
Stabilityunstable
Maintainerstephen.tetley@gmail.com
Description
Graphic types and lifters...
Synopsis
data AGraphic param u a = AGraphic {
agDrawF :: DrawingAttr -> param -> Graphic u
agMakeF :: DrawingAttr -> param -> a
}
type ANode u a = AGraphic (Point2 u) u a
type AFreeGraphic u a = AGraphic () u a
type AConnector u a = Point2 u -> Point2 u -> AFreeGraphic u a
node :: (Num u, TraceM m u, DrawingCtxM m, TurtleScaleM m u) => ANode u a -> m a
nodeAt :: (Num u, TraceM m u, DrawingCtxM m) => ANode u a -> Point2 u -> m a
at :: ANode u a -> Point2 u -> ANode u a
liftAFG :: (Num u, TraceM m u, DrawingCtxM m) => AFreeGraphic u a -> m a
connect :: (Num u, TraceM m u, DrawingCtxM m) => AConnector u a -> Point2 u -> Point2 u -> m a
connect_ :: (Num u, TraceM m u, DrawingCtxM m) => (DrawingAttr -> DrawingAttr) -> AConnector u a -> Point2 u -> Point2 u -> m a
props :: AGraphic pm u a -> (DrawingAttr -> DrawingAttr) -> AGraphic pm u a
thick :: DrawingAttr -> DrawingAttr
Documentation
data AGraphic param u a Source

AGraphic

param typically Point2 u or ()

If the param is a point it will be supplied by the drawing mode / drawing monad (e.g. the Turtle monad which supplies the current point).

Constructors
AGraphic
agDrawF :: DrawingAttr -> param -> Graphic u
agMakeF :: DrawingAttr -> param -> a
show/hide Instances
type ANode u a = AGraphic (Point2 u) u aSource
ANode is drawn a a point supplied by the drawing (e.g. current node of Turtle).
type AFreeGraphic u a = AGraphic () u aSource
type AConnector u a = Point2 u -> Point2 u -> AFreeGraphic u aSource
node :: (Num u, TraceM m u, DrawingCtxM m, TurtleScaleM m u) => ANode u a -> m aSource
nodeAt :: (Num u, TraceM m u, DrawingCtxM m) => ANode u a -> Point2 u -> m aSource
at :: ANode u a -> Point2 u -> ANode u aSource
liftAFG :: (Num u, TraceM m u, DrawingCtxM m) => AFreeGraphic u a -> m aSource
connect :: (Num u, TraceM m u, DrawingCtxM m) => AConnector u a -> Point2 u -> Point2 u -> m aSource
connect_ :: (Num u, TraceM m u, DrawingCtxM m) => (DrawingAttr -> DrawingAttr) -> AConnector u a -> Point2 u -> Point2 u -> m aSource
props :: AGraphic pm u a -> (DrawingAttr -> DrawingAttr) -> AGraphic pm u aSource
thick :: DrawingAttr -> DrawingAttrSource
Produced by Haddock version 2.6.1