Anchors and lines¶
Every shape has named connection points called anchors. The eight compass
names cover the edges and corners — .n, .ne, .e, .se, .s,
.sw, .w, .nw — and .center is the middle. Draw a line
between two anchors to join shapes exactly where you want:
Use .center to aim at a shape’s middle — handy for a leader line pointing
straight at a box:
Nudge an endpoint with a coordinate offset. A.n + (20, 0) starts the line
twenty units to the right of the north anchor:
For right-angled connectors, give the line a path — a sequence of
right/left/up/down steps that routes it between its endpoints:
Position something a fraction of the way between two shapes with between.
Here a caption sits at the midpoint (1/2) of the gap:
Putting anchors to work, here is a three-tier chain wired edge to edge:
Next: draw containers with Groups.