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 node that creates Arc shape #2470

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

optozorax
Copy link

Closes #2434

@optozorax
Copy link
Author

Most of the code copied from

pub fn draw_arc(&mut self, center: DVec2, radius: f64, start_from: f64, end_at: f64) {

Tested it against circle with stroke +1px to see differences between them. Found none, seems pretty accurate.

Works for any angle from 0 to 360.

image

Copy link

📦 Build Complete for 65d3927
https://20e541a4.graphite.pages.dev

@mTvare6
Copy link
Contributor

mTvare6 commented Mar 20, 2025

Doesn't the ellipse part of #1715 also cover the use case of an arc. I believe implementing that would make an arc node redundant. So we shouldn't not have separate nodes.
Inkscape for reference.

pie
segment

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

Successfully merging this pull request may close these issues.

Add arc/unclosed shape options to circle node
2 participants