PolygonGeometry Class
Represents a polygon.
NuGet/Assembly: Carmenta.Engine.5.16.2.nupkg (in the CECore assembly)
Syntax
public class PolygonGeometry : VectorGeometryRemarks
A PolygonGeometry is a geometry that consists of a collection of rings where each ring is represented by a LineGeometry. The ring at index zero is the outline of the polygon.
A ring that is added to a polygon will be closed automatically and its LineGeometry.Closed property will return True.
Inheritance Hierarchy
System.Object (not available in C#)
EngineObject
Geometry
VectorGeometry
PolygonGeometry
Platforms
Windows, Linux, Android
PolygonGeometry Members
The PolygonGeometry type has the following members.
Constructors
| Name | Description |
|---|---|
| PolygonGeometry | Initializes a new instance of the PolygonGeometry class. |
Properties
| Name | Description |
|---|---|
| Area | Gets the area of the PolygonGeometry. |
| Center | Gets the mass center of the PolygonGeometry disregarding any holes. |
| IsDisposed | Gets a value that tells whether the current PolygonGeometry has been disposed. Inherited from EngineObject |
| IsReadOnly | Gets a value indicating whether the PolygonGeometry is read-only or not. Inherited from Geometry |
| IsValid | Gets a value indicating whether the PolygonGeometry is valid or not. Inherited from Geometry |
| NativeHandle | Gets the native Carmenta Engine kernel object the current PolygonGeometry represents. Inherited from EngineObject |
| Rings | Gets the collection that contains all rings that define the PolygonGeometry. |
| Type | Gets the geometry type of a PolygonGeometry. Inherited from Geometry |
Methods
| Name | Description |
|---|---|
| BufferZone | Returns a buffer zone for the PolygonGeometry. |
| CalculateBounds | Returns the bounding rectangle of the Geometry. Inherited from Geometry |
| Clone | Creates a copy of an object. Inherited from EngineObject |
| Overloaded. Returns the convex hull of the specified geometries. | |
| Dispose | Releases the reference to the native Carmenta Engine kernel instance the EngineObject represents. Inherited from EngineObject |
| Equals | Determines whether this instance is equal to another. Inherited from EngineObject |
| Overloaded. Initializes a new Geometry instance from a WKB representation. Inherited from Geometry | |
| Overloaded. Initializes a new Geometry instance from a WKT representation. Inherited from Geometry | |
| Move | Moves the Geometry by the specified offset. Inherited from Geometry |
| PointInside | Checks if a Point is inside the PolygonGeometry but not inside a hole. |
| ToWellKnownBinary | Converts a Geometry instance into WKB representation. Inherited from Geometry |
| ToWellKnownText | Converts a Geometry instance into WKT representation. Inherited from Geometry |
| Transform | Applies a 2D transform to the geometry. Inherited from Geometry |