|
Graphics.Rendering.Diagrams.Layouts | Portability | portable | Stability | experimental | Maintainer | byorgey@gmail.com |
|
|
|
|
|
Description |
Layout definitions for Graphics.Rendering.Diagrams, an embedded
domain-specific language (EDSL) for creating simple diagrams.
|
|
Synopsis |
|
|
|
|
Union
|
|
|
Superimpose one diagram atop another. d1 ## d2 results in a
diagram in which d2 is on top of d1 (i.e., d1 is drawn
first, then d2).
|
|
|
Create a Diagram as a union of subdiagrams which will not be
repositioned. If the subdiagrams overlap, they will appear with
the first Diagram on the bottom, and the last on top.
|
|
|
Create a Diagram as a union of subdiagrams superimposed on one
another, aligned vertically and/or horizontally.
|
|
Lists
|
|
|
d1 <> d2 is a Diagram with d1 to the left of d2, aligned
along their top edges.
|
|
|
d1 // d2 is a Diagram with d1 above d2, aligned
along their left edges.
|
|
|
Lay out a list of Diagrams horizontally from left to right,
aligned along their top edges.
|
|
|
Lay out a list of Diagrams vertically from top to bottom,
aligned along their left edges.
|
|
|
Lay out a list of Diagrams horizontally from left to right,
with the given vertical alignment (top, vcenter, or bottom).
|
|
|
Lay out a list of Diagrams vertically from top to bottom,
with the given horizontal alignment (left, hcenter, or right).
|
|
|
:: Double | amount of separation between each pair of diagrams
| -> [Diagram] | | -> Diagram | | Lay out a list of Diagrams horizontally, aligned along their
top edges, with a given amount of separation in between each pair.
|
|
|
|
:: Double | amount of separation between each pair of diagrams
| -> [Diagram] | | -> Diagram | | Lay out a list of Diagrams vertically, aligned along their
left edges, with a given amount of separation in between each pair.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Create a diagram from a list of subdiagrams with explicit
positions in a local coordinate system. Each subdiagram will be
positioned with its center at the corresponding
position. position is equivalent to positionA hcenter
vcenter.
|
|
|
Create a diagram from a list of subdiagrams with explicit
positions in a local coordinate system. The alignment options
specify what part of each subdiagram should be placed on the
corresponding position. For example, positionA left top will
position the top left corner of each subdiagram at the
corresponding point.
|
|
|
Create a diagram from a list of subdiagrams and a given path, by
positioning the subdiagrams at successive vertices of the path.
If there are more diagrams than path vertices, the extra diagrams
will be discarded.
|
|
|
A version of positionAlong with explicit alignment.
|
|
|
Align diagrams into a grid, with each item centered horizontally and vertically
Warning: there is currently an exponential performace blowup if you nest grids.
(exponential in how deep the nesting is).
|
|
|
Align diagrams into a grid with each item aligned as specified.
Warning: there is currently an exponential performace blowup if you nest grids
(exponential in how deep the nesting is).
|
|
|
Align diagrams into a grid, specifying individual alignments for each item.
Warning: there is currently an exponential performace blowup if you nest grids
(exponential in how deep the nesting is).
|
|
type VAlignment = Alignment | Source |
|
Vertical alignment.
|
|
|
|
|
|
|
|
type HAlignment = Alignment | Source |
|
Horizontal alignment.
|
|
|
|
|
|
|
|
Tree
|
|
|
:: Double | separation between layers
| -> Double | separation between siblings
| -> Tree Diagram | | -> Diagram | | Lay out a Tree (from Data.Tree) of Diagrams in a top-down
fashion. This layout is experimental; future releases of the
Diagrams library are planned which will be able to automatically
draw edges between nodes in the tree.
|
|
|
Miscellaneous
|
|
|
Add extra padding to a diagram. pad w h d is a diagram which
is the same as d, but with w units added to the width and h
units added to the height, with d centered in the available
space. Thus pad w h is equivalent to padA w h hcenter vcenter.
|
|
|
Add extra padding to a diagram, aligning the diagram as indicated
within the avilable space.
|
|
|
Show a rectangle denoting a diagram's bounding box, in addition
to the diagram itself.
|
|
|
Show the bounding boxes of a diagram and all its subdiagrams.
|
|
|
:: Double -> Double -> Diagram | Function for new diagram
| -> Diagram | Old diagram
| -> Diagram | | Create one diagram using the current size of another.
The new diagram is returned, the old one is discarded.
|
|
|
Produced by Haddock version 2.6.1 |