Skip to content

Commit

Permalink
feat: use typst repr in cetz editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Nov 3, 2023
1 parent ac13b9e commit e6c6690
Show file tree
Hide file tree
Showing 6 changed files with 888 additions and 332 deletions.
21 changes: 21 additions & 0 deletions projects/cetz-editor/definitions.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

#let x-circle(rad: 200, inner-text: "") = {
circle((0, 0), radius: rad, name: node-label)
debug-label((-rad*0.7, -rad*0.7))
content(node-label, inner-text)
}
#let x-rect(x: 200, y: none, inner-text: "") = {
let y = if y == none {
x
} else {
y
}
rect((0, 0), (x, y), name: node-label)
debug-label((0, 0))
content(node-label, inner-text)
}
#let x-arrow(start: (0, 10), end: (50, 10), inner-text: "", mark: (end: ">")) = {
set-style(mark: (fill: none, size: 14))
line(start, end, name: "t", mark: mark)
content("t", inner-text)
}
43 changes: 0 additions & 43 deletions projects/cetz-editor/definitions.yaml

This file was deleted.

Loading

0 comments on commit e6c6690

Please sign in to comment.