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

Diagram combinators specialized to two dimensions. For more general combinators, see Diagrams.Combinators.

- (===) :: (HasOrigin a, Boundable a, V a ~ R2, Monoid a) => a -> a -> a
- (|||) :: (HasOrigin a, Boundable a, V a ~ R2, Monoid a) => a -> a -> a
- hcat :: (HasOrigin a, Boundable a, Qualifiable a, V a ~ R2, Monoid a) => [a] -> a
- hcat' :: (HasOrigin a, Boundable a, Qualifiable a, V a ~ R2, Monoid a) => CatOpts R2 -> [a] -> a
- vcat :: (HasOrigin a, Boundable a, Qualifiable a, V a ~ R2, Monoid a) => [a] -> a
- vcat' :: (HasOrigin a, Boundable a, Qualifiable a, V a ~ R2, Monoid a) => CatOpts R2 -> [a] -> a
- strutX :: (Backend b R2, Monoid m) => Double -> AnnDiagram b R2 m
- strutY :: (Backend b R2, Monoid m) => Double -> AnnDiagram b R2 m

# Binary combinators

(===) :: (HasOrigin a, Boundable a, V a ~ R2, Monoid a) => a -> a -> aSource

Place two diagrams (or other boundable objects) vertically adjacent to one another, with the first diagram above the second. Since Haskell ignores whitespace in expressions, one can thus write

c === d

to place `c`

above `d`

.

(|||) :: (HasOrigin a, Boundable a, V a ~ R2, Monoid a) => a -> a -> aSource

Place two diagrams (or other boundable objects) horizontally adjacent to one another, with the first diagram to the left of the second.

# n-ary combinators

hcat :: (HasOrigin a, Boundable a, Qualifiable a, V a ~ R2, Monoid a) => [a] -> aSource

Lay out a list of boundable objects in a row from left to right, so that their local origins lie along a single horizontal line, with successive bounding regions tangent to one another.

- For more control over the spacing, see
`hcat'`

. - To align the diagrams vertically (or otherwise), use alignment
combinators (such as
`alignT`

or`alignB`

) from Diagrams.TwoD.Align before applying`hcat`

. - For non-axis-aligned layout, see
`cat`

.

hcat' :: (HasOrigin a, Boundable a, Qualifiable a, V a ~ R2, Monoid a) => CatOpts R2 -> [a] -> aSource

vcat :: (HasOrigin a, Boundable a, Qualifiable a, V a ~ R2, Monoid a) => [a] -> aSource

Lay out a list of boundable objects in a column from top to bottom, so that their local origins lie along a single vertical line, with successive bounding regions tangent to one another.

- For more control over the spacing, see
`vcat'`

. - To align the diagrams horizontally (or otherwise), use alignment
combinators (such as
`alignL`

or`alignR`

) from Diagrams.TwoD.Align before applying`vcat`

. - For non-axis-aligned layout, see
`cat`

.

vcat' :: (HasOrigin a, Boundable a, Qualifiable a, V a ~ R2, Monoid a) => CatOpts R2 -> [a] -> aSource