added horizontal zigzag wires

This commit is contained in:
Louis Heredero 2024-05-18 16:45:09 +02:00
parent 86d9122740
commit e4194d0925
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7

View File

@ -22,7 +22,11 @@
#let get-zigzag-wire(pts, ratio, dir) = {
let start = pts.first()
let end = pts.last()
let mid = (start, ratio, end)
let mid = if dir == "vertical" {
(start, ratio, (horizontal: end, vertical: ()))
} else {
(start, ratio, (horizontal: (), vertical: end))
}
let points = if dir == "vertical" {
(
@ -235,8 +239,7 @@
}
if slice != none {
let (start, end) = slice
let slice-txt = "[" + str(start) + ":" + str(end) + "]"
let slice-txt = "[" + slice.map(b => str(b)).join(":") + "]"
draw.content(
first-pt,