Class Polyline
Represents a polyline 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 class Polyline : PointList, IReadOnlyList<Vector2>, IReadOnlyCollection<Vector2>, IEnumerable<Vector2>, IEnumerable, IEquatable<PointList>, IEquatable<Polyline>
Constructors
| Edit this page View SourcePolyline(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. |
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 SourceBoundingBox
Declaration
public BoundingBox BoundingBox { get; }
Property Value
| Type | Description |
|---|---|
| BoundingBox |
ConvexHull
Declaration
public ConvexHull ConvexHull { get; }
Property Value
| Type | Description |
|---|---|
| ConvexHull |
Empty
Returns an empty polyLine.
Declaration
public static Polyline Empty { get; }
Property Value
| Type | Description |
|---|---|
| Polyline |
Methods
| Edit this page View SourceEquals(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. |
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)
Declaration
public static Polyline FromXmlString(string xmlString)
Parameters
| Type | Name | Description |
|---|---|---|
| string | xmlString |
Returns
| Type | Description |
|---|---|
| Polyline |
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 SourceToPath()
Declaration
public Path ToPath()
Returns
| Type | Description |
|---|---|
| Path |
ToSvgPolyline()
Declaration
public SvgPolyline ToSvgPolyline()
Returns
| Type | Description |
|---|---|
| SvgPolyline |