diagrams-lib-1.4.3: Embedded domain-specific language for declarative graphics

Copyright | (c) 2014 diagrams-lib team (see LICENSE)
License | BSD-style (see LICENSE)
Maintainer | diagrams-discuss@googlegroups.com
Safe Haskell | None
Language | Haskell2010

Diagrams.ThreeD.Size

Contents

- Computing sizes
- Specifying sizes

Description

Utilities for working with sizes of three-dimensional objects.

Synopsis

- extentX :: (InSpace v n a, R1 v, Enveloped a) => a -> Maybe (n, n)
- extentY :: (InSpace v n a, R2 v, Enveloped a) => a -> Maybe (n, n)
- extentZ :: (InSpace v n a, R3 v, Enveloped a) => a -> Maybe (n, n)
- mkSizeSpec3D :: Num n => Maybe n -> Maybe n -> Maybe n -> SizeSpec V3 n
- dims3D :: n -> n -> n -> SizeSpec V3 n

## Computing sizes

extentX :: (InSpace v n a, R1 v, Enveloped a) => a -> Maybe (n, n) Source #

Compute the absolute x-coordinate range of an enveloped object in the form `(lo,hi)`. Return `Nothing` for objects with an empty envelope.

Note this is just `extent unitX`.

extentY :: (InSpace v n a, R2 v, Enveloped a) => a -> Maybe (n, n) Source #

Compute the absolute y-coordinate range of an enveloped object in the form `(lo,hi)`. Return `Nothing` for objects with an empty envelope.

extentZ :: (InSpace v n a, R3 v, Enveloped a) => a -> Maybe (n, n) Source #

Compute the absolute z-coordinate range of an enveloped object in the form `(lo,hi)`. Return `Nothing` for objects with an empty envelope.

## Specifying sizes

mkSizeSpec3D :: Num n => Maybe n -> Maybe n -> Maybe n -> SizeSpec V3 n Source #

Make a `SizeSpec` from possibly-specified width and height.

dims3D :: n -> n -> n -> SizeSpec V3 n Source #

Make a `SizeSpec` from a width and height.