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

Class PointList

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

Inheritance
object
PointList
ConvexHull
Polygon
Polyline
Implements
IReadOnlyList<Vector2>
IReadOnlyCollection<Vector2>
IEnumerable<Vector2>
IEnumerable
IEquatable<PointList>
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: OpenSvg
Assembly: OpenSvg.dll
Syntax
public abstract class PointList : IReadOnlyList<Vector2>, IReadOnlyCollection<Vector2>, IEnumerable<Vector2>, IEnumerable, IEquatable<PointList>

Constructors

| Edit this page View Source

PointList(ImmutableArray<Vector2>)

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

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

The collection of points.

Fields

| Edit this page View Source

Points

Declaration
protected readonly ImmutableArray<Vector2> Points
Field Value
Type Description
ImmutableArray<Vector2>

Properties

| Edit this page View Source

Count

Gets the number of elements in the collection.

Declaration
public int Count { get; }
Property Value
Type Description
int

The number of elements in the collection.

| Edit this page View Source

this[int]

Gets the element at the specified index in the read-only list.

Declaration
public Vector2 this[int index] { get; }
Parameters
Type Name Description
int index

The zero-based index of the element to get.

Property Value
Type Description
Vector2

The element at the specified index in the read-only list.

Methods

| Edit this page View Source

Contains(Vector2)

Declaration
public bool Contains(Vector2 point)
Parameters
Type Name Description
Vector2 point
Returns
Type Description
bool
| Edit this page View Source

Equals(PointList?)

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

Declaration
public bool Equals(PointList? other)
Parameters
Type Name Description
PointList 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
object.Equals(object)
| Edit this page View Source

FromXmlString(string)

Creates a point sequence from an XML string representation.

Declaration
protected static Vector2[] FromXmlString(string xmlString)
Parameters
Type Name Description
string xmlString

The XML string representing the polyline points.

Returns
Type Description
Vector2[]

An array of points.

Exceptions
Type Condition
ArgumentException

Thrown when an invalid point is encountered in the SVG polyline data.

FormatException

Thrown when a coordinate in the SVG polyline data is invalid.

| Edit this page View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<Vector2> GetEnumerator()
Returns
Type Description
IEnumerator<Vector2>

An enumerator that can be used to iterate through the collection.

| 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
object.GetHashCode()
| Edit this page View Source

PointAtDistance(float)

Declaration
public Vector2? PointAtDistance(float distance)
Parameters
Type Name Description
float distance
Returns
Type Description
Vector2?
| Edit this page View Source

ToString()

Returns a string representing the current polyline object in a readable format.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object.

Overrides
object.ToString()
| Edit this page View Source

ToXmlString()

Converts the polyline to its XML string representation.

Declaration
public string ToXmlString()
Returns
Type Description
string

A string representing the polyline in XML format.

Implements

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

Extension Methods

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