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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Convenience Constructors to shapes #284

Merged
merged 3 commits into from
Aug 14, 2023
Merged

Conversation

JimBobSquarePants
Copy link
Member

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

Fix #100

/// <summary>
/// Initializes a new instance of the <see cref="Path"/> class.
/// </summary>
/// <param name="points">The collection of points.</param>
Copy link
Member

Choose a reason for hiding this comment

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

worth pointing out these are processed as a series of linear line segments

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@@ -11,6 +11,15 @@ namespace SixLabors.ImageSharp.Drawing
/// </summary>
public class Polygon : Path
{
/// <summary>
/// Initializes a new instance of the <see cref="Polygon"/> class.
Copy link
Member

Choose a reason for hiding this comment

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

again woth pointing out thye are handled as a LinearLineSegment

Copy link
Member Author

Choose a reason for hiding this comment

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

and done

@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Merging #284 (67e546e) into main (f7f0f4d) will increase coverage by 0%.
The diff coverage is 100%.

@@         Coverage Diff         @@
##           main   #284   +/-   ##
===================================
  Coverage    80%    80%           
===================================
  Files        97     97           
  Lines      5020   5024    +4     
  Branches    919    919           
===================================
+ Hits       4025   4029    +4     
  Misses      796    796           
  Partials    199    199           
Flag Coverage 螖
unittests 80% <100%> (+<1%) 猬嗭笍

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

Files Changed Coverage 螖
...rawing/Processing/Extensions/DrawLineExtensions.cs 100% <100%> (酶)
...ing/Processing/Extensions/DrawPolygonExtensions.cs 100% <100%> (酶)
...ing/Processing/Extensions/FillPolygonExtensions.cs 100% <100%> (酶)
src/ImageSharp.Drawing/Shapes/Path.cs 75% <100%> (+<1%) 猬嗭笍
src/ImageSharp.Drawing/Shapes/Polygon.cs 88% <100%> (+1%) 猬嗭笍
...mageSharp.Drawing/Shapes/PolygonClipper/Clipper.cs 97% <100%> (酶)
...arp.Drawing/Shapes/PolygonClipper/ClipperOffset.cs 100% <100%> (酶)

馃摚 We鈥檙e building smart automated test selection to slash your CI/CD build times. Learn more

@JimBobSquarePants JimBobSquarePants merged commit 7b2a1ce into main Aug 14, 2023
9 checks passed
@JimBobSquarePants JimBobSquarePants deleted the js/shape-constructors branch August 14, 2023 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convenience constructors for shapes
2 participants