forked from HEL/circuiteria
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.
39 KiB
944x519px
39 KiB
944x519px