added arrow tips (WIP)
This commit is contained in:
parent
6e7dc9913f
commit
6500e5a4a3
@ -2,12 +2,30 @@
|
|||||||
#import "consts.typ": *
|
#import "consts.typ": *
|
||||||
#import "participant.typ"
|
#import "participant.typ"
|
||||||
|
|
||||||
|
#let get-arrow-marks(sym, color) = {
|
||||||
|
if type(sym) == array {
|
||||||
|
return sym.map(s => get-arrow-marks(s, color))
|
||||||
|
}
|
||||||
|
(
|
||||||
|
"": none,
|
||||||
|
">": (symbol: ">", fill: color),
|
||||||
|
">>": (symbol: "straight"),
|
||||||
|
"\\": (symbol: ">", fill: color, harpoon: true, flip: true),
|
||||||
|
"\\\\": (symbol: "straight", harpoon: true, flip: true),
|
||||||
|
"/": (symbol: ">", fill: color, harpoon: true),
|
||||||
|
"//": (symbol: "straight", harpoon: true),
|
||||||
|
"x": none,
|
||||||
|
"o": (symbol: "o"),
|
||||||
|
).at(sym)
|
||||||
|
}
|
||||||
|
|
||||||
#let _seq(
|
#let _seq(
|
||||||
p1,
|
p1,
|
||||||
p2,
|
p2,
|
||||||
comment: none,
|
comment: none,
|
||||||
dashed: false,
|
dashed: false,
|
||||||
tip: "default",
|
start-tip: "",
|
||||||
|
end-tip: ">",
|
||||||
color: black,
|
color: black,
|
||||||
flip: false,
|
flip: false,
|
||||||
enable-dst: false,
|
enable-dst: false,
|
||||||
@ -24,7 +42,8 @@
|
|||||||
p2: p2,
|
p2: p2,
|
||||||
comment: comment,
|
comment: comment,
|
||||||
dashed: dashed,
|
dashed: dashed,
|
||||||
tip: tip,
|
start-tip: start-tip,
|
||||||
|
end-tip: end-tip,
|
||||||
color: color,
|
color: color,
|
||||||
flip: flip,
|
flip: flip,
|
||||||
enable-dst: enable-dst,
|
enable-dst: enable-dst,
|
||||||
@ -119,7 +138,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let style = (
|
let style = (
|
||||||
mark: (end: ">", fill: elmt.color),
|
mark: (
|
||||||
|
start: get-arrow-marks(elmt.start-tip, elmt.color),
|
||||||
|
end: get-arrow-marks(elmt.end-tip, elmt.color)
|
||||||
|
),
|
||||||
stroke: (
|
stroke: (
|
||||||
dash: if elmt.dashed {"dashed"} else {"solid"},
|
dash: if elmt.dashed {"dashed"} else {"solid"},
|
||||||
paint: elmt.color
|
paint: elmt.color
|
||||||
|
Loading…
Reference in New Issue
Block a user