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 ShapePath::current_position() #271

Open
baozaolaoba-top opened this issue Dec 26, 2024 · 1 comment
Open

Add ShapePath::current_position() #271

baozaolaoba-top opened this issue Dec 26, 2024 · 1 comment

Comments

@baozaolaoba-top
Copy link

In v0.11.0, current_position is a useful method, especially in the scenario of custom drawing svg. Can this function be added back in the latest version?

@Nilirad
Copy link
Owner

Nilirad commented Jan 26, 2025

ShapePath is now implemented differently. It no longer has a builder, but is just a Vec<Action> which is evaluated lazily in the Geometry::add_geometry method.

Theoretically, it is possible to add a current_position field to ShapePath and update its value in each method, but it is not trivial to do for methods who do not have an explicit end position, like arc. The implementation is not trivial in lyon, so if someone is willing to do it, can open a PR addressing this issue.

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

No branches or pull requests

2 participants