added some styling options

This commit is contained in:
2024-06-18 13:51:01 +02:00
parent 14cbda2ffb
commit 974eb92159
4 changed files with 29 additions and 6 deletions

View File

@ -1,7 +1,7 @@
#import "@preview/cetz:0.2.2": canvas, draw
#let X-SPACE = 2
#let Y-SPACE = 30
#let Y-SPACE = 20
#let get-participants-i(participants) = {
let pars-i = (:)
@ -69,10 +69,18 @@
if elmt.type == "seq" {
let x1 = x-pos.at(pars-i.at(elmt.p1))
let x2 = x-pos.at(pars-i.at(elmt.p2))
let style = (
mark: (end: "straight"),
stroke: (
dash: if elmt.dashed {"dashed"} else {"solid"},
paint: elmt.color
)
)
draw.line(
(x1, y),
(x2, y),
mark: (end: "straight")
..style
)
if elmt.comment != none {
draw.content(