Class MultiPolygon
Represents a collection of enclosed polygon groups.
Implements
Inherited Members
Namespace: OpenSvg
Assembly: OpenSvg.dll
Syntax
public class MultiPolygon : IReadOnlyList<EnclosedPolygonGroup>, IReadOnlyCollection<EnclosedPolygonGroup>, IEnumerable<EnclosedPolygonGroup>, IEnumerable
Constructors
| Edit this page View SourceMultiPolygon()
Initializes a new instance of the MultiPolygon class.
Declaration
public MultiPolygon()
See Also
| Edit this page View SourceMultiPolygon(IEnumerable<EnclosedPolygonGroup>)
Initializes a new instance of the MultiPolygon class with the specified collection of EnclosedPolygonGroup objects.
Declaration
public MultiPolygon(IEnumerable<EnclosedPolygonGroup> polygonGroups)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<EnclosedPolygonGroup> | polygonGroups | The collection of EnclosedPolygonGroup objects to add. |
MultiPolygon(IEnumerable<Polygon>)
Initializes a new instance of the MultiPolygon class with the specified collection of Polygon objects. The input polygons will be added into to proper groups of type EnclosedPolygonGroup
Declaration
public MultiPolygon(IEnumerable<Polygon> polygons)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Polygon> | polygons | The collection of Polygon objects to add. |
Properties
| Edit this page View SourceBoundingBox
Gets the bounding box that encloses all polygons in the MultiPolygon.
Declaration
public BoundingBox BoundingBox { get; }
Property Value
Type | Description |
---|---|
BoundingBox | The bounding box enclosing all polygons. |
ConvexHull
Declaration
public ConvexHull ConvexHull { get; }
Property Value
Type | Description |
---|---|
ConvexHull | The convex hull of all polygons. |
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. |
this[int]
Gets the element at the specified index in the read-only list.
Declaration
public EnclosedPolygonGroup this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index of the element to get. |
Property Value
Type | Description |
---|---|
EnclosedPolygonGroup | The element at the specified index in the read-only list. |
Methods
| Edit this page View SourceGetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<EnclosedPolygonGroup> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<EnclosedPolygonGroup> | An enumerator that can be used to iterate through the collection. |
ToPath()
Converts the MultiPolygon to a Path.
Declaration
public Path ToPath()
Returns
Type | Description |
---|---|
Path | An Path representing the MultiPolygon. |