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

decoration: Allow specifying amplitudes as lengths #767

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

Jollywatt
Copy link
Contributor

This allows the amplitude parameter in path decorations to be given as a length, for example:

fn(line((0,0), (4,0)), amplitude: 0.25)
fn(line((0,1), (4,1)), amplitude: 2.5mm)
fn(line((0,2), (4,2)), amplitude: t => 1em*calc.sin(float(t)*calc.pi))
fn(line((0,3), (4,3)), amplitude: (5mm, 0, 2mm, 0))

for a path decoration function fn.

@Jollywatt
Copy link
Contributor Author

This is a follow up from #756.

@johannes-wolf johannes-wolf self-requested a review December 6, 2024 22:50
@johannes-wolf johannes-wolf added the enhancement ⬆️ New feature or request label Dec 6, 2024
Copy link
Member

@johannes-wolf johannes-wolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@johannes-wolf johannes-wolf merged commit 3ed021f into cetz-package:master Dec 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ⬆️ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants