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

Some marks are pointing towards the wrong target coordinate. #458

Closed jrde-88758 closed 7 months ago

jrde-88758 commented 7 months ago

This code:

#import "@preview/cetz:0.2.0"

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

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

  content((1,1), [(1,1)], anchor: "south-west")
  content((1,-1), [(1,-1)], anchor: "north-west")

  circle((0,0), radius: 2pt)

  mark((0,0), (-1,0), symbol: "stealth", scale: 2, fill: black)
  mark((0,0), (1,0), symbol: "stealth", scale: 2, fill: gray)

  mark((0,0), (1,1), symbol: "stealth", scale: 3, fill: red)
  mark((0,0), (1,-1), symbol: "stealth", scale: 3, fill: blue)  
})

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

I would say that only the black and the gray mark are pointing towards the correct target coordinate. The red and the blue mark are mirrored. Would you agree on this?

Thank you for all your work,

JR

johannes-wolf commented 7 months ago

Thank you! The mark function is missing a call to apply-transform. Fixing PR is linked.