wumpus-basic-0.6.0: Common drawing utilities built on wumpus-core.

PortabilityGHC
Stabilityunstable
Maintainerstephen.tetley@gmail.com

Wumpus.Basic.Monads.Drawing

Description

Graphic types and lifters...

Synopsis

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 

Fields

agDrawF :: DrawingAttr -> param -> Graphic u
 
agMakeF :: DrawingAttr -> param -> a
 

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 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