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 arcs and do not throw when outlining #302

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

JimBobSquarePants
Copy link
Member

@JimBobSquarePants JimBobSquarePants commented Oct 25, 2023

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Fixes #299, #300

The way I was handling arc generation when the arc sweep represented a closed ellipse didn't take into consideration the start angle.

Fixing the issue meant that we threw during outlining when someone requested the short arc so I fixed the offsetter to return the unclipped path I also fixed the handling of paths containing a single point.

@JimBobSquarePants JimBobSquarePants added bug Something isn't working enhancement New feature or request area:shapes labels Oct 25, 2023
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #302 (edb6db2) into main (dfae51c) will increase coverage by 0%.
The diff coverage is 92%.

@@         Coverage Diff         @@
##           main   #302   +/-   ##
===================================
  Coverage    80%    80%           
===================================
  Files        97     97           
  Lines      4937   4937           
  Branches    878    881    +3     
===================================
+ Hits       3975   3990   +15     
+ Misses      769    753   -16     
- Partials    193    194    +1     
Flag Coverage Δ
unittests 80% <92%> (+<1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/ImageSharp.Drawing/Shapes/ArcLineSegment.cs 96% <100%> (+<1%) ⬆️
...mageSharp.Drawing/Shapes/PolygonClipper/BoundsF.cs 28% <ø> (+28%) ⬆️
....Drawing/Shapes/PolygonClipper/PolygonOffsetter.cs 74% <60%> (+1%) ⬆️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@tocsoft tocsoft 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 to me 👍

@JimBobSquarePants JimBobSquarePants merged commit 85721f8 into main Oct 25, 2023
29 checks passed
@JimBobSquarePants JimBobSquarePants deleted the js/fix-arcs-plus-degenerate-outlining branch October 25, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:shapes bug Something isn't working enhancement New feature or request
Projects
None yet
2 participants