wumpus-basic-0.14.0: Common drawing utilities built on wumpus-core.

Stabilityhighly unstable




Bounded versions of Graphic and LocGraphic.

Bounded meaning they are actually Images that return the bounding box of the Graphic.


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.

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

openStroke : 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.