Class PointList
Represents a sequence of points. Provides methods for generating bounding boxes and translating polylines using a specified transform.
Implements
Inherited Members
Namespace: OpenSvg
Assembly: OpenSvg.dll
Syntax
public abstract class PointList : IReadOnlyList<Vector2>, IReadOnlyCollection<Vector2>, IEnumerable<Vector2>, IEnumerable, IEquatable<PointList>
  Constructors
| Edit this page View SourcePointList(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 SourcePoints
Declaration
protected readonly ImmutableArray<Vector2> Points
  Field Value
| Type | Description | 
|---|---|
| ImmutableArray<Vector2> | 
Properties
| Edit this page View SourceCount
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.  | 
      
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 SourceContains(Vector2)
Declaration
public bool Contains(Vector2 point)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Vector2 | point | 
Returns
| Type | Description | 
|---|---|
| bool | 
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.  | 
      
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
| Edit this page View SourceFromXmlString(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.  | 
      
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.  | 
      
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
  Returns
| Type | Description | 
|---|---|
| int | A hash code for the current object.  | 
      
Overrides
| Edit this page View SourcePointAtDistance(float)
Declaration
public Vector2? PointAtDistance(float distance)
  Parameters
| Type | Name | Description | 
|---|---|---|
| float | distance | 
Returns
| Type | Description | 
|---|---|
| Vector2? | 
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
| Edit this page View SourceToXmlString()
Converts the polyline to its XML string representation.
Declaration
public string ToXmlString()
  Returns
| Type | Description | 
|---|---|
| string | A string representing the polyline in XML format.  |