Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | stephen.tetley@gmail.com |
Common types and operations.
- type LocQuery u a = CF (Point2 u -> a)
- type LocThetaQuery u a = CF (Point2 u -> Radian -> a)
- type ConnectorQuery u a = CF (Point2 u -> Point2 u -> a)
- type GraphicAns u = ImageAns u (UNil u)
- data ImageAns u a = Ans CatPrim a
- graphicAns :: CatPrim -> GraphicAns u
- mapAns :: (a -> a1) -> ImageAns u a -> ImageAns u a1
- replaceAns :: ans -> ImageAns u a -> ImageAns u ans
- ignoreAns :: ImageAns u a -> GraphicAns u
- answer :: ImageAns u a -> a
- hyperlink :: XLink -> ImageAns u a -> ImageAns u a
- clipObject :: PrimPath -> ImageAns t u -> ImageAns t u
- szconvAnsF :: (Functor t, InterpretUnit u, InterpretUnit u1) => FontSize -> ImageAns u (t u) -> ImageAns u1 (t u1)
- szconvAnsZ :: FontSize -> ImageAns u a -> ImageAns u1 a
- at :: LocQuery u a -> Point2 u -> CF a
- incline :: LocThetaQuery u a -> Radian -> LocQuery u a
- atIncline :: LocThetaQuery u a -> Point2 u -> Radian -> CF a
- connect :: ConnectorQuery u a -> Point2 u -> Point2 u -> CF a
- replaceAnsR0 :: ans -> CF (ImageAns u a) -> CF (ImageAns u ans)
- replaceAnsR1 :: ans -> CF (r1 -> ImageAns u a) -> CF (r1 -> ImageAns u ans)
- replaceAnsR2 :: ans -> CF (r1 -> r2 -> ImageAns u a) -> CF (r1 -> r2 -> ImageAns u ans)
- decorateR0 :: CF (ImageAns u a) -> CF (GraphicAns u) -> CF (ImageAns u a)
- decorateR1 :: CF (r1 -> ImageAns u a) -> CF (r1 -> GraphicAns u) -> CF (r1 -> ImageAns u a)
- decorateR2 :: CF (r1 -> r2 -> ImageAns u a) -> CF (r1 -> r2 -> GraphicAns u) -> CF (r1 -> r2 -> ImageAns u a)
- elaborateR0 :: CF (ImageAns u a) -> (a -> CF (GraphicAns u)) -> CF (ImageAns u a)
- elaborateR1 :: CF (r1 -> ImageAns u a) -> (a -> CF (r1 -> GraphicAns u)) -> CF (r1 -> ImageAns u a)
- elaborateR2 :: CF (r1 -> r2 -> ImageAns u a) -> (a -> CF (r1 -> r2 -> GraphicAns u)) -> CF (r1 -> r2 -> ImageAns u a)
Documentation
type LocThetaQuery u a = CF (Point2 u -> Radian -> a)Source
type ConnectorQuery u a = CF (Point2 u -> Point2 u -> a)Source
type GraphicAns u = ImageAns u (UNil u)Source
graphicAns :: CatPrim -> GraphicAns uSource
mapAns :: (a -> a1) -> ImageAns u a -> ImageAns u a1Source
Map the answer produced by a graphic object.
Note - the new answer must share the same unit type as the initial answer, although it does not need to have the same wrapper type.
replaceAns :: ans -> ImageAns u a -> ImageAns u ansSource
Replace the answer produced by a graphic object.
Note - the new answer must share the same unit type as the initial answer, although it does not need to have the same wrapper type.
ignoreAns :: ImageAns u a -> GraphicAns uSource
Turn an imageAns into a GraphicAns by ignoring the result.
Usually this function will be used with one of the push
family of combinators.
LocImage-to-LocGraphic = pushR1 ignoreAns
hyperlink :: XLink -> ImageAns u a -> ImageAns u aSource
Note - maybe this requires an arity family instead?
clipObject :: PrimPath -> ImageAns t u -> ImageAns t uSource
Clip a graphic object.
Note - maybe this requires an arity family instead?
szconvAnsF :: (Functor t, InterpretUnit u, InterpretUnit u1) => FontSize -> ImageAns u (t u) -> ImageAns u1 (t u1)Source
szconvAnsZ :: FontSize -> ImageAns u a -> ImageAns u1 aSource
at :: LocQuery u a -> Point2 u -> CF aSource
Downcast a LocCF
function by applying it to the supplied
point, making an arity-zero Context Function.
Remember a LocCF
function is a CF1
context function where
the static argument is specialized to a start point.
incline :: LocThetaQuery u a -> Radian -> LocQuery u aSource
Downcast a LocThetaQuery
function by applying it to the
supplied angle, making an arity-one Context Function (a
LocCF
).
atIncline :: LocThetaQuery u a -> Point2 u -> Radian -> CF aSource
Downcast a LocThetaQuery function by applying it to the supplied point and angle, making an arity-zero Context Function (a CF).
connect :: ConnectorQuery u a -> Point2 u -> Point2 u -> CF aSource
Downcast a ConnectorQuery
function by applying it to the
start and end point, making an arity-zero Context Function
(a CF
).
replaceAnsR1 :: ans -> CF (r1 -> ImageAns u a) -> CF (r1 -> ImageAns u ans)Source
Replace the ans - arity 1.
replaceAnsR2 :: ans -> CF (r1 -> r2 -> ImageAns u a) -> CF (r1 -> r2 -> ImageAns u ans)Source
Replace the ans - arity 2.
decorateR0 :: CF (ImageAns u a) -> CF (GraphicAns u) -> CF (ImageAns u a)Source
Decorate an Image by superimposing a Graphic.
Note - this function has a very general type signature and supports various graphic types:
decorateR1 :: CF (r1 -> ImageAns u a) -> CF (r1 -> GraphicAns u) -> CF (r1 -> ImageAns u a)Source
decorateR2 :: CF (r1 -> r2 -> ImageAns u a) -> CF (r1 -> r2 -> GraphicAns u) -> CF (r1 -> r2 -> ImageAns u a)Source
elaborateR0 :: CF (ImageAns u a) -> (a -> CF (GraphicAns u)) -> CF (ImageAns u a)Source
Decorate an Image by superimposing a Graphic.
Note - this function has a very general type signature and supports various graphic types:
elaborateR1 :: CF (r1 -> ImageAns u a) -> (a -> CF (r1 -> GraphicAns u)) -> CF (r1 -> ImageAns u a)Source
Decorate an Image by superimposing a Graphic.
Note - this function has a very general type signature and supports various graphic types:
elaborateR2 :: CF (r1 -> r2 -> ImageAns u a) -> (a -> CF (r1 -> r2 -> GraphicAns u)) -> CF (r1 -> r2 -> ImageAns u a)Source