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

Fix dashed line algorithm #540

Merged
merged 1 commit into from
Jan 21, 2024
Merged

Conversation

KmolYuan
Copy link
Contributor

#483
I'm sorry, I found some problems using the dashed line algorithm. When the distance between points is greater than the size or spacing of the dashed line, the algorithm will produce an incorrect continuous straight line.

This new algorithm was tested using two curve coordinate sequences (as shown in the following), "point distance less than size" and "point distance greater than size," the above results were corrected.

In addition, if the size equals 0 pixel, it will not be drawn.

Left: point distance less than size or spacing
Right: point distance greater than size or spacing

Copy link
Member

@AaronErhardt AaronErhardt left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@AaronErhardt AaronErhardt merged commit 9613a5a into plotters-rs:master Jan 21, 2024
18 checks passed
@KmolYuan KmolYuan deleted the dashed-fix branch January 22, 2024 05:21
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.

2 participants