JuliaGraphics / Luxor.jl

Simple drawings using vector graphics; Cairo "for tourists!"
http://juliagraphics.github.io/Luxor.jl/
Other
575 stars 72 forks source link

Fix intersect lines and polysmooth function #287

Closed GiggleLiu closed 8 months ago

GiggleLiu commented 8 months ago

This PR fixes the following two bugs.

  1. The polysmooth has one extra line connecting to it.
  2. The intersectlinepoly can not find intersection in some corner case.
codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (24b2bf9) 76.09% compared to head (bba8e24) 76.10%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #287 +/- ## ========================================== + Coverage 76.09% 76.10% +0.01% ========================================== Files 36 36 Lines 6602 6605 +3 ========================================== + Hits 5024 5027 +3 Misses 1578 1578 ``` | [Files](https://app.codecov.io/gh/JuliaGraphics/Luxor.jl/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGraphics) | Coverage Δ | | |---|---|---| | [src/point.jl](https://app.codecov.io/gh/JuliaGraphics/Luxor.jl/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGraphics#diff-c3JjL3BvaW50Lmps) | `90.16% <100.00%> (ø)` | | | [src/polygons.jl](https://app.codecov.io/gh/JuliaGraphics/Luxor.jl/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaGraphics#diff-c3JjL3BvbHlnb25zLmps) | `74.77% <100.00%> (+0.11%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cormullion commented 8 months ago

Thanks!

cormullion commented 8 months ago

In general I think this code/function is probably not very good, but we would have to switch to proper libraries like Clipper2 to make much progress.