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

Parameters

array $points

Return Value

Polygon

float area()

Calculates the area of a closed simple polygon.

Return Value

float

bool isOuterRing()

Determines whether a set of points represents an outer ring.

If points are in clockwise orientation then, they form an outer ring.

Return Value

bool

Point|false getPointOnSurface()

Returns a point that is guaranteed to be on the surface of the ring.

(for simple closed rings)

Return Value

Point|false

a point on the surface of the ring