| Portability | GHC |
|---|---|
| Stability | highly unstable |
| Maintainer | stephen.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.
- type LocGraphic u = LocQuery u (GraphicAns u)
- type LocImage u a = LocQuery u (ImageAns u a)
- type DLocImage a = LocImage Double a
- type DLocGraphic = LocGraphic Double
- intoLocImage :: LocQuery u a -> LocGraphic u -> LocImage u a
- locGraphic_ :: LocImage u a -> LocGraphic u
- emptyLocGraphic :: InterpretUnit u => LocGraphic u
- uconvLocImageF :: (InterpretUnit u, InterpretUnit u1, Functor t) => LocImage u (t u) -> LocImage u1 (t u1)
- uconvLocImageZ :: (InterpretUnit u, InterpretUnit u1) => LocImage u a -> LocImage u1 a
- distrib :: (Monoid a, InterpretUnit u) => Vec2 u -> [LocImage u a] -> LocImage u a
- distribH :: (Monoid a, InterpretUnit u) => u -> [LocImage u a] -> LocImage u a
- distribV :: (Monoid a, InterpretUnit u) => u -> [LocImage u a] -> LocImage u a
- duplicate :: (Monoid a, InterpretUnit u) => Int -> Vec2 u -> LocImage u a -> LocImage u a
- duplicateH :: (Monoid a, InterpretUnit u) => Int -> u -> LocImage u a -> LocImage u a
- duplicateV :: (Monoid a, InterpretUnit u) => Int -> u -> LocImage u a -> LocImage u a
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 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
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