cetz-package / cetz

CeTZ: ein Typst Zeichenpaket - A library for drawing stuff with Typst.
https://cetz-package.github.io
GNU Lesser General Public License v3.0
733 stars 34 forks source link

mark: Refactor mark drawing #610

Open johannes-wolf opened 1 month ago

johannes-wolf commented 1 month ago

Changes:

Visual Changes:

New Features:

#canvas({
  import draw: *

  register-mark("face", style => {
    circle((0,0), radius: .5, fill: yellow)
    arc((0,0), start: 180deg + 30deg, delta: 180deg - 60deg, anchor: "origin", radius: .3)
    circle((-.15, +.15), radius: .1, fill: white)
    circle((-.10, +.10), radius: .025, fill: black)
    circle((+.15, +.15), radius: .1, fill: white)
    circle((+.20, +.10), radius: .025, fill: black)

    anchor("tip", (+.5, 0))
    anchor("base", (-.5, 0))
  }, mnemonic: ":)")

  catmull((-3, 0), (-1,1), (1,-1), (3,0), mark: (
    end: "face", start: (symbol: ":)", flip: true, reverse: true), ))
})

grafik

Ping: @Jollywatt