Portability | GHC |
---|---|
Stability | unstable |
Maintainer | stephen.tetley@gmail.com |
Graphic types and lifters...
- 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).
AGraphic | |
|
Functor (AGraphic pm u) | |
Applicative (AGraphic pm u) |
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
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