Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | stephen.tetley@gmail.com |
Bounded versions of Graphic and LocGraphic.
Bounded meaning they are actually Images that return the bounding box of the Graphic.
These abojects are type synonyms.
- type BoundedGraphic u = Image u (BoundingBox u)
- type DBoundedGraphic = BoundedGraphic Double
- type BoundedLocGraphic u = LocImage u (BoundingBox u)
- type DBoundedLocGraphic = BoundedLocGraphic Double
- type BoundedLocThetaGraphic u = LocThetaImage u (BoundingBox u)
- type DBoundedLocThetaGraphic = BoundedLocThetaGraphic Double
- emptyBoundedLocGraphic :: InterpretUnit u => BoundedLocGraphic u
- emptyBoundedLocThetaGraphic :: InterpretUnit u => BoundedLocThetaGraphic u
- centerOrthoBBox :: (Real u, Floating u, Ord u) => Radian -> BoundingBox u -> BoundingBox u
- illustrateBoundedGraphic :: InterpretUnit u => BoundedGraphic u -> BoundedGraphic u
- illustrateBoundedLocGraphic :: InterpretUnit u => BoundedLocGraphic u -> BoundedLocGraphic u
- illustrateBoundedLocThetaGraphic :: InterpretUnit u => BoundedLocThetaGraphic u -> BoundedLocThetaGraphic u
- bbrectangle :: InterpretUnit u => BoundingBox u -> Graphic u
Bounded graphic / loc graphic
type BoundedGraphic u = Image u (BoundingBox u)Source
Graphic with a bounding box.
type BoundedLocGraphic u = LocImage u (BoundingBox u)Source
LocGraphic with a bounding box.
type BoundedLocThetaGraphic u = LocThetaImage u (BoundingBox u)Source
LocThetaGraphic with a bounding box.
Note the size of bounding box for the "same" shape will vary according to the rotation. A bounding box is always orthonormal (?) to the x- and y-axes.
emptyBoundedLocGraphic :: InterpretUnit u => BoundedLocGraphic uSource
emptyBoundedLocGraphic
: BoundedLocGraphic
Build an empty BoundedLocGraphic
.
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
emptyBoundedLocThetaGraphic
: BoundedLocThetaGraphic
Build an empty BoundedLocThetaGraphic
.
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 (the implicit
inclination can be ignored).
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.
illustrateBoundedGraphic :: InterpretUnit u => BoundedGraphic u -> BoundedGraphic uSource
Draw a BoundedGraphic, illustrating the bounding box.
illustrateBoundedLocGraphic :: InterpretUnit u => BoundedLocGraphic u -> BoundedLocGraphic uSource
Draw a BoundedLocGraphic, illustrating the bounding box.
illustrateBoundedLocThetaGraphic :: InterpretUnit u => BoundedLocThetaGraphic u -> BoundedLocThetaGraphic uSource
Draw a BoundedLocThetaGraphic, illustrating the bounding box.
bbrectangle :: InterpretUnit u => BoundingBox u -> Graphic uSource