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

PortabilityGHC
Stabilityhighly unstable
Maintainerstephen.tetley@gmail.com
Safe HaskellSafe-Infered

Wumpus.Basic.Kernel.Objects.Bounded

Contents

Description

Helpers for working with Images and LocImages that produce bounding boxes.

Synopsis

Type synonyms

Bounding box graphic helpers

centerOrthoBBox :: (Real u, Floating u, Ord u) => Radian -> BoundingBox u -> BoundingBox uSource

centerOrthoBBox : theta * bbox -> BBox

Rotate a bounding box by theta about its center. Take the new bounding box.

Remember that bounding boxes are always orthonormal rectangles, so the dimensions as well as the positions may change under rotation.

emptyBoundedLocGraphic :: InterpretUnit u => BoundedLocGraphic uSource

Build an empty LocGraphic returning a bounding box.

The emptyBoundedLocGraphic is treated as a null primitive by Wumpus-Core and is not drawn, although it does generate the minimum bounding box with both the bottom-left and upper-right corners at the implicit start point.

emptyBoundedLocThetaGraphic :: InterpretUnit u => BoundedLocThetaGraphic uSource

Build an empty LocThetaGraphic returning a bounding box.

The emptyBoundedLocThetaGraphic is treated as a null primitive by Wumpus-Core and is not drawn, although it does generate the minimum bounding box with both the bottom-left and upper-right corners at the implicit start point

illustrateBoundedGraphic :: InterpretUnit u => Image u (BoundingBox u) -> Image u (BoundingBox u)Source

Draw a BoundedGraphic, illustrating the bounding box.

illustrateBoundedLocGraphic :: InterpretUnit u => LocImage u (BoundingBox u) -> LocImage u (BoundingBox u)Source

Draw a BoundedLocGraphic, illustrating the bounding box.

illustrateBoundedLocThetaGraphic :: InterpretUnit u => LocThetaImage u (BoundingBox u) -> LocThetaImage u (BoundingBox u)Source

Draw a BoundedLocThetaGraphic, illustrating the bounding box.

bbrectangle :: InterpretUnit u => BoundingBox u -> Graphic uSource

Draw a bounding box as a stroked rectangle with dotted lines.

boundedRect :: InterpretUnit u => DrawMode -> u -> u -> BoundedLocGraphic uSource

boundedRect : style * width * height -> LocGraphic

Create a stroked rectangle - the implicit start point is bottom-left, return the bounding box of the rectangle as the answer.

The line properties (colour, pen thickness, etc.) are taken from the implicit DrawingContext.