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

Draw antialiased lines on non-pixel coordinates #425

Open
KarelPeeters opened this issue Aug 24, 2020 · 1 comment
Open

Draw antialiased lines on non-pixel coordinates #425

KarelPeeters opened this issue Aug 24, 2020 · 1 comment

Comments

@KarelPeeters
Copy link

KarelPeeters commented Aug 24, 2020

As far as I can tell there are two functions to draw lines in this crate:

  • draw_antialiased_line_segment, which draws antialiased lines but only takes integer/pixel coordinates so you can't be as precise as you want
  • draw_line_segment which takes f32 coordinates but unfortunately doesn't do any antialiasing

Would it be possible to add a function that combines both of these features?

@KarelPeeters
Copy link
Author

It looks like https://docs.rs/line_drawing/0.8.0/line_drawing/struct.XiaolinWu.html has a working implementation, it might be interesting to share the actual algorithms between the two crates.

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

1 participant