Safe Haskell | None |
---|---|

Language | Haskell98 |

- type Backend' b = (Backend b R2, Renderable (Path R2) b)
- vline :: Backend' b => Double -> Diagram b R2
- hline :: Backend' b => Double -> Diagram b R2
- hcatsep :: (Juxtaposable a, HasOrigin a, Monoid' a, V a ~ R2) => [a] -> a
- vcatsep :: (Juxtaposable a, HasOrigin a, Monoid' a, V a ~ R2) => [a] -> a
- smash :: Backend' b => QDiagram b R2 Any -> QDiagram b R2 Any
- translatep :: (Transformable t, V t ~ R2) => (Int, Int) -> t -> t
- r2i :: (Int, Int) -> R2
- p2i :: (Int, Int) -> P2
- mirror :: (Transformable t, V t ~ R2) => t -> t
- interleave :: [a] -> [a] -> [a]
- spread :: Backend' b => R2 -> [Diagram b R2] -> Diagram b R2
- dmid :: (Enveloped a, V a ~ R2) => a -> Double
- besidesL :: (Backend' b, Semigroup m, Monoid m) => QDiagram b R2 m -> QDiagram b R2 m -> QDiagram b R2 m
- besidesR :: (Backend' b, Semigroup m, Monoid m) => QDiagram b R2 m -> QDiagram b R2 m -> QDiagram b R2 m
- fit :: (Transformable t, Enveloped t, V t ~ R2) => Double -> t -> t
- text' :: Backend' b => String -> Diagram b R2
- phantom' :: Backend' b => Diagram b R2 -> Diagram b R2

# Documentation

vline :: Backend' b => Double -> Diagram b R2 Source

Vertical/horizontal stroked line of given length.

hline :: Backend' b => Double -> Diagram b R2 Source

Vertical/horizontal stroked line of given length.

hcatsep :: (Juxtaposable a, HasOrigin a, Monoid' a, V a ~ R2) => [a] -> a Source

Variant of `hcat'`

that spreads with distance `1`

.

vcatsep :: (Juxtaposable a, HasOrigin a, Monoid' a, V a ~ R2) => [a] -> a Source

Variant of `vcat'`

that spreads with distance `1`

,
and stacks towards the top.

smash :: Backend' b => QDiagram b R2 Any -> QDiagram b R2 Any Source

Collapse the envelope to a point.

translatep :: (Transformable t, V t ~ R2) => (Int, Int) -> t -> t Source

Helper to translate by a point given as `(Int, Int)`

.

mirror :: (Transformable t, V t ~ R2) => t -> t Source

interleave :: [a] -> [a] -> [a] Source

Interleave two lists.

spread :: Backend' b => R2 -> [Diagram b R2] -> Diagram b R2 Source

Spread diagrams evenly along the given vector.

besidesL :: (Backend' b, Semigroup m, Monoid m) => QDiagram b R2 m -> QDiagram b R2 m -> QDiagram b R2 m Source

Place the second diagram to the right of the first, aligning both vertically. The origin is the origin of the left diagram.

besidesR :: (Backend' b, Semigroup m, Monoid m) => QDiagram b R2 m -> QDiagram b R2 m -> QDiagram b R2 m Source

Variant of `besidesL`

where the origin is that of the right diagram.

fit :: (Transformable t, Enveloped t, V t ~ R2) => Double -> t -> t Source

`fit f a`

scales `a`

to fit into a square of size `f`

.