Back to top OpenSVG (c) Veridict AB, www.veridict.com
Edit this page

Class Polyline

Represents a polyline of points. Provides methods for generating bounding boxes and translating polylines using a specified transform.

Inheritance
object
PointList
Polyline
Implements
IReadOnlyList<Vector2>
IReadOnlyCollection<Vector2>
IEnumerable<Vector2>
IEnumerable
IEquatable<PointList>
IEquatable<Polyline>
Inherited Members
PointList.Points
PointList.Count
PointList.this[int]
PointList.Contains(Vector2)
PointList.PointAtDistance(float)
PointList.Equals(PointList)
PointList.ToXmlString()
PointList.ToString()
PointList.GetEnumerator()
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: OpenSvg
Assembly: OpenSvg.dll
Syntax
public class Polyline : PointList, IReadOnlyList<Vector2>, IReadOnlyCollection<Vector2>, IEnumerable<Vector2>, IEnumerable, IEquatable<PointList>, IEquatable<Polyline>

Constructors

| Edit this page View Source

Polyline(IEnumerable<Vector2>)

Initializes a new instance of the Polyline class with the specified collection of points.

Declaration
public Polyline(IEnumerable<Vector2> points)
Parameters
Type Name Description
IEnumerable<Vector2> points

The collection of points.

| Edit this page View Source

Polyline(ImmutableArray<Vector2>)

Initializes a new instance of the Polyline class with the specified collection of points.

Declaration
public Polyline(ImmutableArray<Vector2> points)
Parameters
Type Name Description
ImmutableArray<Vector2> points

An immutable array of points.

Properties

| Edit this page View Source

BoundingBox

Declaration
public BoundingBox BoundingBox { get; }
Property Value
Type Description
BoundingBox
| Edit this page View Source

ConvexHull

Declaration
public ConvexHull ConvexHull { get; }
Property Value
Type Description
ConvexHull
| Edit this page View Source

Empty

Returns an empty polyLine.

Declaration
public static Polyline Empty { get; }
Property Value
Type Description
Polyline

Methods

| Edit this page View Source

Equals(Polyline?)

Determines whether the specified object is equal to the current object.

Declaration
public bool Equals(Polyline? other)
Parameters
Type Name Description
Polyline other

The object to compare with the current object.

Returns
Type Description
bool

true if the specified object is equal to the current object; otherwise, false.

| Edit this page View Source

Equals(object?)

Determines whether the specified object is equal to the current object.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj

The object to compare with the current object.

Returns
Type Description
bool

true if the specified object is equal to the current object; otherwise, false.

Overrides
PointList.Equals(object?)
| Edit this page View Source

FromXmlString(string)

Declaration
public static Polyline FromXmlString(string xmlString)
Parameters
Type Name Description
string xmlString
Returns
Type Description
Polyline
| Edit this page View Source

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current object.

Overrides
PointList.GetHashCode()
| Edit this page View Source

ToPath()

Converts the Polyline to a Path.

Declaration
public Path ToPath()
Returns
Type Description
Path

The Polyline represented as a Path.

| Edit this page View Source

ToSvgPolyline()

Declaration
public SvgPolyline ToSvgPolyline()
Returns
Type Description
SvgPolyline

Implements

IReadOnlyList<T>
IReadOnlyCollection<T>
IEnumerable<T>
IEnumerable
IEquatable<T>
IEquatable<T>

Extension Methods

PointCollectionExtensions.Max(IEnumerable<Vector2>)
PointCollectionExtensions.Min(IEnumerable<Vector2>)