wumpus-drawing-0.4.0: High-level drawing objects built on Wumpus-Basic.

PortabilityGHC
Stabilityunstable
Maintainerstephen.tetley@gmail.com

Wumpus.Drawing.Basis.TraceGraphic

Description

Build multi-part Graphics with an accumulator (i.e. a Writer monad).

Note - the run functions for the transformer and the plain monad are quite different. This is mandated by the need to single-thread the DrawingContext through the transformer.

Synopsis

Documentation

class Monad m => TraceGraphicM m whereSource

Methods

tellImage :: MonUnit (m ()) ~ u => Image u a -> m aSource

tellImage_ :: MonUnit (m ()) ~ u => Image u a -> m ()Source

runTraceGraphicT :: Monad m => DrawingContext -> TraceGraphicT u m a -> m (a, HPrim u)Source

Note - this needs DrawingContext as an explicit parameter, and hence it returns a pair of (a, HPrim u) rather than an Image.

It is expected this will be wrapped in to form a specific TraceDrawing draw function for the amalgamated monad.