better ghosts
All checks were successful
/ test_checkout (push) Successful in 1m49s

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2025-10-16 00:54:26 +02:00
parent 074010755c
commit 679076fc63
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
3 changed files with 56 additions and 14 deletions

View file

@ -30,10 +30,18 @@ pirat-color.red,
}
]
#let ghost(img, ..args,) = {
move(
#let ghost(img, dx: 0pt, dy: 0pt, height: 100pt, ..args,) = context {
let img = image(img, height: height)
let s = measure(img)
let hx = s.width / 2
let hy = s.height / 2
place(
bottom + left,
dx: dx - hx,
dy: -dy + hy,
..args,
image(img, height: 100pt)
img
)
}