wumpus-core-0.12.0: Pure Haskell PostScript and SVG generation.

PortabilityGHC only
Stabilityexperimental
Maintainerstephen.tetley@gmail.com

Wumpus.Core.BoundingBox

Contents

Description

Bounding box with no notion of 'empty'.

Synopsis

Types

data BoundingBox a Source

Bounding box of a picture.

We cannot construct empty pictures - so bounding boxes too a saved the obligation to be empty.

Constructors

BBox 

Fields

ll_corner :: Point2 a
 
ur_corner :: Point2 a
 

Instances

data CardinalPoint Source

Constructors

C 
N 
NE 
E 
SE 
S 
SW 
W 
NW 

Type class

class Boundary a whereSource

Methods

boundary :: a -> BoundingBox (DUnit a)Source

Instances

(Num u, Ord u) => Boundary (Path u) 
(Fractional u, Ord u) => Boundary (Primitive u) 
Boundary (Picture u) 

Operations

obbox :: Num a => a -> a -> BoundingBox aSource

Create a BoundingBox with bottom left corner at the origin, and dimensions w and h.

trace :: (Num a, Ord a) => [Point2 a] -> BoundingBox aSource

lowerLeftUpperRight :: (a, a, a, a) -> BoundingBox a -> (a, a, a, a)Source