Maintainer | diagrams-discuss@googlegroups.com |
---|

General tools for alignment. Any boundable object with a local origin can be aligned; this includes diagrams, of course, but it also includes paths.

# Documentation

align :: (HasOrigin a, Boundable a) => V a -> a -> aSource

`align v`

aligns a boundable object along the edge in the
direction of `v`

. That is, it moves the local origin in the
direction of `v`

until it is on the boundary. (Note that if the
local origin is outside the boundary to begin, it may have to
move "backwards".)

alignBy :: (HasOrigin a, Boundable a) => V a -> Rational -> a -> aSource

`align v d a`

moves the origin of `a`

to a distance of `d*r`

from
the center along `v`

, where `r`

is the radius along `v`

. Hence
`align v 0`

centers along `v`

, and `align v 1`

moves the origin
in the direction of `v`

to the very edge of the bounding region.