Conversation
Codecov Report
@@ Coverage Diff @@
## main #265 +/- ##
=====================================
+ Coverage 61% 78% +17%
=====================================
Files 100 97 -3
Lines 6427 5067 -1360
Branches 1374 932 -442
=====================================
+ Hits 3923 3985 +62
+ Misses 2308 898 -1410
+ Partials 196 184 -12
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| /// <summary> | ||
| /// No clipping is performed. | ||
| /// </summary> | ||
| None, |
There was a problem hiding this comment.
None only seems useful if we allow choosing the operation via Outline. I don't know if it's wise to do so since Clipper.Offset uses Union by default with FillRule.Positive and FillRule.Negative which PolygonScanner does not support.
|
|
||
| namespace SixLabors.ImageSharp.Drawing.Shapes.PolygonClipper | ||
| { | ||
| internal struct BoundsF |
There was a problem hiding this comment.
There's a good chance this can be removed and we can use RectangleF
I disagree this kind of refactoring is needed. We don't want to maintain (=understand + test) that code. Much better to include the original code as-is (only visibilities changed), and provide a facade on the top, so it is a no-brainer to keep it in sync with the upstream. Refactoring on the other hand gives extra work and has a non-zero chance to introduce bugs. I don't see the value, only downsides. |
That horse has bolted I’m afraid. The refactor to half the memory usage and use Vector2 was significant. I’m happy to track upstream and implement any fixes. |
I didn't know (or missed) that part. If so, it all makes sense. Wasn't able to look at this during the weekend, hope this week I can do it. |
No worries. I found a few things to improve upon this evening anyway. |
Prerequisites
Description
ClippingOperationenum toIPath.ClipviaShapeOptions. Fixes Add possibility to make intersection of shapes #10#263 should be merged before this as I'll likely have to update the reference file again.
TODO;
PolygonClipperandPolygonOffsetterto match standards.ClippingOperationvalues.PolygonScannerneeds to support the Clipper fill rulesPositiveandNegative