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
819 stars 35 forks source link

Top anchor of the circle-element is upside down. #398

Closed jrde-88758 closed 9 months ago

jrde-88758 commented 9 months ago

This code:

#import "@preview/cetz:0.1.2"

#set page(paper: "a4", margin: 1.5cm, flipped: false)

#cetz.canvas({
  import cetz.draw: *

  grid((-4,-4), (4,4), stroke: (paint: gray, thickness: 0.4pt))

  circle( (0,0), radius: 2cm, fill: none, name: "E" )

  content("E.top-right", [E.top-right], anchor: "bottom-left")
  content("E.top", [E.top], anchor: "bottom")
  content("E.top-left", [E.top-left], anchor: "bottom-right")
})

#cetz.canvas({
  import cetz.draw: *

  grid((-4,-4), (4,4), stroke: (paint: gray, thickness: 0.4pt))

  rect((-2,-2), (2,2), radius: 2cm, fill: none, name: "E" )

  content("E.top-right", [E.top-right], anchor: "bottom-left")
  content("E.top", [E.top], anchor: "bottom")
  content("E.top-left", [E.top-left], anchor: "bottom-right")
})

leads (with the latest compiler version of the "typst.app") to this result:

Bildschirmfoto vom 2023-12-12 11-00-39

Is this a bug or did I something wrong? Thank you for all your work!

JR

johannes-wolf commented 9 months ago

This is a bug. It is fixed on 0.2.0 and will be released soon.