This commit is contained in:
parent
926acf8fdb
commit
9dcaefe7c9
3 changed files with 1011 additions and 163 deletions
|
|
@ -2,7 +2,7 @@
|
|||
#import "figures.typ": figures, get_figure
|
||||
|
||||
#import "../lib.typ": pb1-text, pb2-text, pb3-text
|
||||
#import "icons.typ": th-outline
|
||||
#import "icons.typ": arrow
|
||||
|
||||
#let pirat-color = (
|
||||
black: rgb("#000000"),
|
||||
|
|
@ -117,30 +117,3 @@ pirat-color.red,
|
|||
#let eye-2 = ghost.with("imgs/ghosts/eye-2.png")
|
||||
#let eye-3 = ghost.with("imgs/ghosts/eye-3.png")
|
||||
#let eye-4 = ghost.with("imgs/ghosts/eye-4.png")
|
||||
|
||||
#let arrow(start, end, strk: 3pt + black) = {
|
||||
let strk = stroke(strk)
|
||||
start.at(1) = -start.at(1)
|
||||
end.at(1) = -end.at(1)
|
||||
let (xe, ye) = end
|
||||
let (xs, ys) = start
|
||||
let w = xe.pt() - xs.pt()
|
||||
let h = ye.pt() - ys.pt()
|
||||
let len = if w == 0pt and h == 0pt {
|
||||
1pt
|
||||
} else {
|
||||
calc.sqrt(w*w + h*h)
|
||||
}
|
||||
let cos = w / len
|
||||
let sin = h / len
|
||||
|
||||
place(bottom + left, line(start: start, end: end, stroke: strk))
|
||||
place(bottom + left, polygon(
|
||||
fill: strk.paint,
|
||||
stroke: strk,
|
||||
end,
|
||||
(xe + strk.thickness * (sin - cos), ye - strk.thickness * (sin + cos )),
|
||||
(xe - strk.thickness * (sin + cos), ye - strk.thickness * (sin - cos )),
|
||||
))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue