Commit Graph
11 Commits
Author SHA1 Message Date
David Stadelmann d9abaf4a53 feat: add pentagon-shaped ports
Add an optional pentagon shape for block and group ports, configured via
the element-level `port-shape`, `port-kind` and `port-size` parameters.
Individual ports can override them with `shape`, `kind`, `size`,
`stroke` and `fill`. Clock ports with a pentagon shape drop the clock
triangle and default to a gray fill.

Wires attach to the outer end of the pentagon by default. With the new
`shell` parameter on `element.elmt` they attach to the inner tip
instead.

Each port is exposed as a CeTZ group with a `default` anchor plus the
cardinal sub-anchors `.east`, `.west`, `.north` and `.south` on the
pentagon's bounding box, so wires can attach to any face. For
non-pentagon ports the sub-anchors collapse to the default attach point,
and the bare `<elmt-id>-port-<port-id>` anchor resolves as before.

Add the `port-shape` and `port-shape-attach` examples and the
`gallery/test_port_shape` gallery entry.
2026-10-22 00:30:10 +02:00
David Stadelmann c14e2ceab9 feat: add port-name-padding parameter
Replaces the hard-coded 2pt padding used when placing port name labels.
Configurable per element via port-name-padding on elmt (forwarded by
block and group), defaulting to 2pt to preserve existing layout.
2026-10-22 00:29:52 +02:00
David Stadelmann 13e3fee913 feat: add ports on group elements
Groups now accept ports/ports-margins like blocks. Port name labels
default to outside the group border (outside-port-names: true) so they
don't overlap child elements; set to false for block-style inside
labels.
2026-10-22 00:28:18 +02:00
HEL 459892bb13 refactor: centralize cetz import 2026-06-30 18:48:34 +02:00
Shmerlard 87643983ec added guided wire 2025-08-17 22:05:36 +03:00
bono 94d5d6b854 add examples and add iec gates to manual 2025-06-28 13:56:22 -03:00
HEL ff0b91e683 updated compiler version + dependencies 2025-03-01 21:22:08 +01:00
HEL a856b7f634 added doc for wire.intersection 2024-05-18 21:52:46 +02:00
HEL 86d9122740 added groups 2024-05-18 13:06:57 +02:00
HEL 64a6146f32 added doc for gates + minor changes 2024-05-17 22:24:38 +02:00
HEL 4d97062d30 improved doc + moved examples to separate file 2024-05-17 16:52:43 +02:00