Skip to content

Commit 3b747f0

Browse files
committed
Add convenience constructor to ComplexPolygon
1 parent 6a24a19 commit 3b747f0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/ImageSharp.Drawing/Shapes/ComplexPolygon.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ public sealed class ComplexPolygon : IPath, IPathInternals, IInternalPathOwner
2020
private readonly List<InternalPath> internalPaths;
2121
private readonly float length;
2222

23+
/// <summary>
24+
/// Initializes a new instance of the <see cref="ComplexPolygon"/> class.
25+
/// </summary>
26+
/// <param name="contour">The contour path</param>
27+
/// <param name="hole">the hole path</param>
28+
public ComplexPolygon(PointF[] contour, PointF[] hole)
29+
: this(new Path(new LinearLineSegment(contour)), new Path(new LinearLineSegment(hole)))
30+
{
31+
}
32+
2333
/// <summary>
2434
/// Initializes a new instance of the <see cref="ComplexPolygon" /> class.
2535
/// </summary>

0 commit comments

Comments
 (0)