wumpus-basic-0.17.0: Basic objects and system code built on Wumpus-Core.

PortabilityGHC
Stabilityhighly unstable
Maintainerstephen.tetley@gmail.com

Wumpus.Basic.Kernel.Objects.LocImage

Contents

Description

LocImage and LocGraphic types - these are functional types from the DrawingContext and start point to a graphic primitive.

Synopsis

Documentation

type LocGraphic u = LocQuery u (GraphicAns u)Source

LocGraphic - function from DrawingContext and start point to a graphic primitive.

type LocImage u a = LocQuery u (ImageAns u a)Source

Graphic - function from DrawingContext and start point to a polymorphic answer and a graphic primitive.

The answer is expected to be a Functor.

type DLocImage a = LocImage Double aSource

Type specialized version of LocImage.

type DLocGraphic = LocGraphic DoubleSource

Type specialized version of LocGraphic.

intoLocImage :: LocQuery u a -> LocGraphic u -> LocImage u aSource

intoLocImage : loc_query * loc_graphic -> LocImage

Loc version of intoImage.

The LocImage is built as a function from an implicit start point to the answer.

locGraphic_ :: LocImage u a -> LocGraphic uSource

Downcast an LocImage to a LocGraphic.

This means forgetting the answer of the LocImage, replacing it with ().

emptyLocGraphic :: InterpretUnit u => LocGraphic uSource

emptyLocGraphic : LocGraphic

Build an empty LocGraphic (i.e. a function from Point to Graphic). This is a path with a start point but no path segments.

The emptyLocGraphic is treated as a null primitive by Wumpus-Core and is not drawn, although it does generate a minimum bounding box at the implicit start point.

uconvLocImageF :: (InterpretUnit u, InterpretUnit u1, Functor t) => LocImage u (t u) -> LocImage u1 (t u1)Source

Use this to convert LocGraphic or LocImage with Functor answer.

uconvLocImageZ :: (InterpretUnit u, InterpretUnit u1) => LocImage u a -> LocImage u1 aSource

Use this to convert LocImage with unit-less answer.

Composing LocImages

distrib :: (Monoid a, InterpretUnit u) => Vec2 u -> [LocImage u a] -> LocImage u aSource

distribH :: (Monoid a, InterpretUnit u) => u -> [LocImage u a] -> LocImage u aSource

distribV :: (Monoid a, InterpretUnit u) => u -> [LocImage u a] -> LocImage u aSource

duplicate :: (Monoid a, InterpretUnit u) => Int -> Vec2 u -> LocImage u a -> LocImage u aSource

This is analogue to replicate in the Prelude.

duplicateH :: (Monoid a, InterpretUnit u) => Int -> u -> LocImage u a -> LocImage u aSource

duplicateV :: (Monoid a, InterpretUnit u) => Int -> u -> LocImage u a -> LocImage u aSource