interface Geometry · Shapes

Polygon

interface Polygon extends PolygonalShape

A closed shape: straight lines join its points, and the last point to the first.

Polygons computes with polygons (area, centroid, containment, …). Triangle, Rectangle and Box are polygons and are accepted wherever a Polygon is.

Properties

geometricTypereadonly

geometricType: "Box" | "Rectangle" | "Polygon" | "Triangle"

This property is only used for static typing. Evaluating it at run time returns undefined.

Inherited

From ReadOnlyCollection count

From Sequence at, elements, set, setAt

From Iterable [iterator]