Polygon
final class Polygon extends SplDoublyLinkedList (View source)
Methods
static Polygon
fromXYArray(array $points)
No description
float
area()
Calculates the area of a closed simple polygon.
bool
isOuterRing()
Determines whether a set of points represents an outer ring.
Point|false
getPointOnSurface()
Returns a point that is guaranteed to be on the surface of the ring.
Details
static Polygon
fromXYArray(array $points)
No description
float
area()
Calculates the area of a closed simple polygon.
bool
isOuterRing()
Determines whether a set of points represents an outer ring.
If points are in clockwise orientation then, they form an outer ring.
Point|false
getPointOnSurface()
Returns a point that is guaranteed to be on the surface of the ring.
(for simple closed rings)