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

Stabilityhighly unstable




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.


Positionable image

data PosObject u Source

A positionable "Object" that is drawn as a BoundedLocGraphic.


type DPosObject = PosObject DoubleSource

Version of PosObject specialized to Double for the unit type.


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.

extendPosObject :: Num u => u -> u -> u -> u -> PosObject u -> PosObject uSource

Extend the orientation.

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.