updated CeTZ to v0.4.0
| @@ -1 +1 @@ | |||||||
| #import "@preview/cetz:0.3.4": * | #import "@preview/cetz:0.4.0": * | ||||||
| @@ -45,18 +45,14 @@ | |||||||
|     (x0, y0), |     (x0, y0), | ||||||
|     (x1, y1) |     (x1, y1) | ||||||
|   ) |   ) | ||||||
|   draw.merge-path( |  | ||||||
|     fill: COL-GRP-NAME, |  | ||||||
|     close: true, |  | ||||||
|     { |  | ||||||
|   draw.line( |   draw.line( | ||||||
|     (x0, y0), |     (x0, y0), | ||||||
|     (x0 + w, y0), |     (x0 + w, y0), | ||||||
|     (x0 + w, y0 - h / 2), |     (x0 + w, y0 - h / 2), | ||||||
|     (x0 + w - 5, y0 - h), |     (x0 + w - 5, y0 - h), | ||||||
|         (x0, y0 - h) |     (x0, y0 - h), | ||||||
|       ) |     fill: COL-GRP-NAME, | ||||||
|     } |     close: true | ||||||
|   ) |   ) | ||||||
|   draw.content( |   draw.content( | ||||||
|     (x0, y0), |     (x0, y0), | ||||||
|   | |||||||
| @@ -49,10 +49,6 @@ | |||||||
|   return box(note.content, inset: inset) |   return box(note.content, inset: inset) | ||||||
| } | } | ||||||
|  |  | ||||||
| #let pre-render(note) = { |  | ||||||
|    |  | ||||||
| } |  | ||||||
|  |  | ||||||
| #let render(note, y: auto, forced: false) = { | #let render(note, y: auto, forced: false) = { | ||||||
|   if not note.linked { |   if not note.linked { | ||||||
|     if not note.aligned { |     if not note.aligned { | ||||||
| @@ -111,21 +107,22 @@ | |||||||
|     let y1 = y0 - h |     let y1 = y0 - h | ||||||
|  |  | ||||||
|     if note.shape == "default" { |     if note.shape == "default" { | ||||||
|       draw.merge-path( |  | ||||||
|         stroke: black + .5pt, |  | ||||||
|         fill: note.color, |  | ||||||
|         close: true, |  | ||||||
|         { |  | ||||||
|       draw.line( |       draw.line( | ||||||
|         (x0, y0), |         (x0, y0), | ||||||
|         (x1, y0), |         (x1, y0), | ||||||
|         (x2, y0 - NOTE-CORNER-SIZE), |         (x2, y0 - NOTE-CORNER-SIZE), | ||||||
|         (x2, y1), |         (x2, y1), | ||||||
|             (x0, y1) |         (x0, y1), | ||||||
|  |         stroke: black + .5pt, | ||||||
|  |         fill: note.color, | ||||||
|  |         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" { |     } else if note.shape == "rect" { | ||||||
|       draw.rect( |       draw.rect( | ||||||
|         (x0, y0), |         (x0, y0), | ||||||
| @@ -137,11 +134,6 @@ | |||||||
|       let lx = x0 + PAD.last() |       let lx = x0 + PAD.last() | ||||||
|       let rx = x2 - PAD.last() |       let rx = x2 - PAD.last() | ||||||
|       let my = (y0 + y1) / 2 |       let my = (y0 + y1) / 2 | ||||||
|       draw.merge-path( |  | ||||||
|         stroke: black + .5pt, |  | ||||||
|         fill: note.color, |  | ||||||
|         close: true, |  | ||||||
|         { |  | ||||||
|       draw.line( |       draw.line( | ||||||
|         (lx, y0), |         (lx, y0), | ||||||
|         (rx, y0), |         (rx, y0), | ||||||
| @@ -149,8 +141,9 @@ | |||||||
|         (rx, y1), |         (rx, y1), | ||||||
|         (lx, y1), |         (lx, y1), | ||||||
|         (x0, my), |         (x0, my), | ||||||
|           ) |         stroke: black + .5pt, | ||||||
|         } |         fill: note.color, | ||||||
|  |         close: true | ||||||
|       ) |       ) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -15,10 +15,10 @@ | |||||||
|     "": none, |     "": none, | ||||||
|     ">": (symbol: ">", fill: color), |     ">": (symbol: ">", fill: color), | ||||||
|     ">>": (symbol: "straight"), |     ">>": (symbol: "straight"), | ||||||
|     "\\": (symbol: ">", fill: color, harpoon: true, flip: true), |     "\\": (symbol: ">", fill: color, harpoon: true), | ||||||
|     "\\\\": (symbol: "straight", harpoon: true, flip: true), |     "\\\\": (symbol: "straight", harpoon: true), | ||||||
|     "/": (symbol: ">", fill: color, harpoon: true), |     "/": (symbol: ">", fill: color, harpoon: true, flip: true), | ||||||
|     "//": (symbol: "straight", harpoon: true), |     "//": (symbol: "straight", harpoon: true, flip: true), | ||||||
|     "x": none, |     "x": none, | ||||||
|     "o": none, |     "o": none, | ||||||
|   ).at(sym) |   ).at(sym) | ||||||
|   | |||||||
| Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB | 
| Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB | 
| Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB | 
| Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB | 
| Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB | 
| Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB | 
| Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB | 
| Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB | 
| Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB | 
| Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB | 
| Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB | 
| Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB | 
| Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |