updated CeTZ to v0.4.0
This commit is contained in:
@ -49,10 +49,6 @@
|
||||
return box(note.content, inset: inset)
|
||||
}
|
||||
|
||||
#let pre-render(note) = {
|
||||
|
||||
}
|
||||
|
||||
#let render(note, y: auto, forced: false) = {
|
||||
if not note.linked {
|
||||
if not note.aligned {
|
||||
@ -111,21 +107,22 @@
|
||||
let y1 = y0 - h
|
||||
|
||||
if note.shape == "default" {
|
||||
draw.merge-path(
|
||||
draw.line(
|
||||
(x0, y0),
|
||||
(x1, y0),
|
||||
(x2, y0 - NOTE-CORNER-SIZE),
|
||||
(x2, y1),
|
||||
(x0, y1),
|
||||
stroke: black + .5pt,
|
||||
fill: note.color,
|
||||
close: true,
|
||||
{
|
||||
draw.line(
|
||||
(x0, y0),
|
||||
(x1, y0),
|
||||
(x2, y0 - NOTE-CORNER-SIZE),
|
||||
(x2, y1),
|
||||
(x0, y1)
|
||||
)
|
||||
}
|
||||
close: true
|
||||
)
|
||||
draw.line(
|
||||
(x1, y0),
|
||||
(x1, y0 - NOTE-CORNER-SIZE),
|
||||
(x2, y0 - NOTE-CORNER-SIZE),
|
||||
stroke: black + .5pt
|
||||
)
|
||||
draw.line((x1, y0), (x1, y0 - NOTE-CORNER-SIZE), (x2, y0 - NOTE-CORNER-SIZE), stroke: black + .5pt)
|
||||
} else if note.shape == "rect" {
|
||||
draw.rect(
|
||||
(x0, y0),
|
||||
@ -137,20 +134,16 @@
|
||||
let lx = x0 + PAD.last()
|
||||
let rx = x2 - PAD.last()
|
||||
let my = (y0 + y1) / 2
|
||||
draw.merge-path(
|
||||
draw.line(
|
||||
(lx, y0),
|
||||
(rx, y0),
|
||||
(x2, my),
|
||||
(rx, y1),
|
||||
(lx, y1),
|
||||
(x0, my),
|
||||
stroke: black + .5pt,
|
||||
fill: note.color,
|
||||
close: true,
|
||||
{
|
||||
draw.line(
|
||||
(lx, y0),
|
||||
(rx, y0),
|
||||
(x2, my),
|
||||
(rx, y1),
|
||||
(lx, y1),
|
||||
(x0, my),
|
||||
)
|
||||
}
|
||||
close: true
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user