Table of Contents

Class Polygon

Namespace
SixLabors.ImageSharp.Drawing
Assembly
SixLabors.ImageSharp.Drawing.dll

A shape made up of a single closed path made up of one of more ILineSegments

public class Polygon : Path, ISimplePath, IPath
Inheritance
Polygon
Implements
Derived
Inherited Members
Extension Methods

Constructors

Polygon(ILineSegment)

Initializes a new instance of the Polygon class.

public Polygon(ILineSegment segment)

Parameters

segment ILineSegment

The segment.

Polygon(params ILineSegment[])

Initializes a new instance of the Polygon class.

public Polygon(params ILineSegment[] segments)

Parameters

segments ILineSegment[]

The segments.

Polygon(PointF[])

Initializes a new instance of the Polygon class.

public Polygon(PointF[] points)

Parameters

points PointF[]

The collection of points; processed as a series of linear line segments.

Polygon(IEnumerable<ILineSegment>)

Initializes a new instance of the Polygon class.

public Polygon(IEnumerable<ILineSegment> segments)

Parameters

segments IEnumerable<ILineSegment>

The segments.

Properties

IsClosed

Gets a value indicating whether this instance is a closed path.

public override bool IsClosed { get; }

Property Value

bool

Methods

Transform(Matrix4x4)

Transforms the path using the specified matrix.

public override IPath Transform(Matrix4x4 matrix)

Parameters

matrix Matrix4x4

The matrix.

Returns

IPath

A new path with the matrix applied to it.