| Portability | GHC |
|---|---|
| Stability | highly unstable |
| Maintainer | stephen.tetley@gmail.com |
Wumpus.Basic.Kernel.Objects.PosObject
Contents
Description
Extended Graphic object - a rectangular positionable Image.
This graphic object has a more flexible API for positioning
than other graphic objects. Rather than a LocGraphic which
supports a single method of positioning at some start-point,
a PosGraphic can be drawn at its center or locations on its
outer rectangle.
- data PosObject u
- type DPosObject = PosObject Double
- runPosObject :: Fractional u => RectAddress -> PosObject u -> LocImage u (BoundingBox u)
- makePosObject :: Query u (Orientation u) -> LocGraphic u -> PosObject u
- emptyPosObject :: InterpretUnit u => PosObject u
- localPosObject :: DrawingContextF -> PosObject u -> PosObject u
- decoPosObject :: (Orientation u -> LocGraphic u) -> ZDeco -> PosObject u -> PosObject u
- extendPosObject :: Num u => u -> u -> u -> u -> PosObject u -> PosObject u
- mapOrientation :: (Orientation u -> Orientation u) -> PosObject u -> PosObject u
- illustratePosObject :: InterpretUnit u => PosObject u -> LocGraphic u
Positionable image
A positionable "Object" that is drawn as a
BoundedLocGraphic.
Instances
| (Fractional u, Ord u, InterpretUnit u) => Monoid (PosObject u) | |
| (Fractional u, Ord u) => AlignSpace (PosObject u) | |
| (Fractional u, Ord u) => Align (PosObject u) | |
| (Num u, Ord u) => CatSpace (PosObject u) | |
| (Num u, Ord u) => Concat (PosObject u) | |
| (Fractional u, Ord u, InterpretUnit u) => ZConcat (PosObject u) |
type DPosObject = PosObject DoubleSource
Version of PosObject specialized to Double for the unit type.
Operations
runPosObject :: Fractional u => RectAddress -> PosObject u -> LocImage u (BoundingBox u)Source
Version of runPosObject that produces a
LocImage that returns a bounding box.
The PosObject is run with only rect-address as an explicit
argument (start-point is implicit). The corresponding answer is
an arity one Graphic that needs drawing with the start-point.
makePosObject :: Query u (Orientation u) -> LocGraphic u -> PosObject uSource
makePosObject : object_pos * loc_image -> PosObject
Create a PosObject from an Orientation describing how it
is orientated within a border rectangle and a LocImage that
draws it.
This is the primary constructor for PosObjects. Because the PosObject type is considered as a specialized object it does not have the range of functions of LocImage or LocThetaImage.
emptyPosObject :: InterpretUnit u => PosObject uSource
emptyPosObject : PosObject
Build an empty PosGraphicObject.
localPosObject :: DrawingContextF -> PosObject u -> PosObject uSource
Apply a DrawingContext update to a PosObject.
decoPosObject :: (Orientation u -> LocGraphic u) -> ZDeco -> PosObject u -> PosObject uSource
extendPosObject :: Num u => u -> u -> u -> u -> PosObject u -> PosObject uSource
Extend the orientation.
mapOrientation :: (Orientation u -> Orientation u) -> PosObject u -> PosObject uSource
illustratePosObject :: InterpretUnit u => PosObject u -> LocGraphic uSource
Illustrate a PosObject by super-imposing its Orientation.
This turns the PosObject into a LocImage drawn at the locus
of the PosObject.