Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mark: for path decorations #446

Open
johannes-wolf opened this issue Jan 10, 2024 · 3 comments
Open

Add mark: for path decorations #446

johannes-wolf opened this issue Jan 10, 2024 · 3 comments
Assignees
Labels
feature 🎁 Feature Request
Milestone

Comments

@johannes-wolf
Copy link
Member

johannes-wolf commented Jan 10, 2024

Add mark support for coil, wave, zigzag.

@johannes-wolf johannes-wolf added the feature 🎁 Feature Request label Jan 10, 2024
@johannes-wolf johannes-wolf changed the title Add mark: for merge-path Add mark: for path decorations Jan 17, 2024
@johannes-wolf johannes-wolf added this to the 0.3.0 milestone Jan 17, 2024
@johannes-wolf johannes-wolf self-assigned this Jan 17, 2024
@johannes-wolf johannes-wolf modified the milestones: 0.3.0, 0.4.0 Aug 7, 2024
@janosh
Copy link
Contributor

janosh commented Jan 25, 2025

just to write the code in a way that will render correctly in the future, will the mark: (end: "stealth") go on the line or the decoration?

#import "@preview/cetz:0.3.2": canvas, draw, decorations

#canvas({
  decorations.zigzag(
    draw.line(
      (-re-range, 0),
      (re-range, 0),
      mark: (end: "stealth"),
    ),
    amplitude: 0.1,
    segment-length: 0.2,
    name: "branch-cut",
  )
})

@johannes-wolf
Copy link
Member Author

johannes-wolf commented Jan 25, 2025

just to write the code in a way that will render correctly in the future, will the mark: (end: "stealth") go on the line or the decoration?

I think for decorations like zigzag, ... it should go on the decoration/modified path. Idea is to have different kinds of decorations. Some that alter the original path and some that add new elements without changing the original path. I am not yet sure, though.

@johannes-wolf
Copy link
Member Author

There is a poc PR here: #541 but it needs to be re-done.
Marks could be decorations, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎁 Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants