CeTZ 0.5.2 requires 3D coordinate vectors (x, y, z) for raw
coordinate tuples passed to coordinate.resolve(). Update internal
wire computations (dodge, guided) to use 3-element tuples, fix
.last() to .at(1) for y-component access on resolved coordinates,
and add a normalize-coord utility that automatically pads user-
provided 2D points (x, y) to (x, y, 0) so users do not need to
specify the z dimension.
Add the `zigzag-at` parameter to place the middle bend of a zigzag wire
on the axis of a referenced anchor. It overrides `zigzag-ratio`, which
now defaults to `auto` (resolving to 50%) so the two are mutually
exclusive. Accepted forms are an anchor name, any CeTZ coordinate, or
the scalar offset `(rel: <length>, to: <coord>)`.
Add the generic helpers this relies on and that other wire styles reuse:
- `normalize-scalar-offset(at, axis)` turns a scalar offset into an x or
y offset; `normalize-zigzag-at` is a wrapper around it.
- `detect-port-side(anchor, ctx)` deduces the cardinal side a port faces
by comparing it with its element's `.center` anchor.
Add the `zigzag-at` example.
When `zigzag-dir` is `auto` (the new default), deduce it from the
endpoint port anchors using `detect-port-side`. East/west ports yield
"vertical" and north/south ports yield "horizontal". If the direction
cannot be deduced (no port anchor on either endpoint, or conflicting
directions) it falls back to "vertical", the previous default.
Add the "u-shape" wire style, which connects two ports facing the same
cardinal side with a U-shaped bend. `u-side` selects the side and is
auto-detected from the port anchors with `detect-port-side` when set to
`auto`. `u-depth` sets the distance of the bend from the outermost
endpoint.
Add `u-at` for anchor-based placement of the crossbar, analogous to
`zigzag-at`. It overrides `u-depth`, which defaults to `auto` so the two
are mutually exclusive.
Add the `u-shape-wire` and `u-at` examples, extend the `wires` example
and add the `gallery/test_ushape` gallery entry.
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Just another shape that we use very often in designs
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.