Rectangle

Rectangle shape.

Constructor

new Rectangle(begin, end)

Parameters:
NameTypeDescription
beginPoint2D

A Point2D representing the beginning of the rectangle.

endPoint2D

A Point2D representing the end of the rectangle.

Classes

Rectangle

Methods

equals(rhs) → {boolean}

Check for equality.

Parameters:
NameTypeDescription
rhsRectangle

The object to compare to.

Returns:

True if both objects are equal.

Type: 
boolean

getBegin() → {Point2D}

Get the begin point of the rectangle.

Returns:

The begin point of the rectangle

Type: 
Point2D

getEnd() → {Point2D}

Get the end point of the rectangle.

Returns:

The end point of the rectangle

Type: 
Point2D

getHeight() → {number}

Get the height of the rectangle.

Returns:

The height of the rectangle.

Type: 
number

getRealHeight() → {number}

Get the real height of the rectangle.

Returns:

The real height of the rectangle.

Type: 
number

getRealWidth() → {number}

Get the real width of the rectangle.

Returns:

The real width of the rectangle.

Type: 
number

getRound() → {object}

Get the rounded limits of the rectangle.

Returns:

The rounded limits.

Type: 
object

getSurface() → {number}

Get the surface of the rectangle.

Returns:

The surface of the rectangle.

Type: 
number

getWidth() → {number}

Get the width of the rectangle.

Returns:

The width of the rectangle.

Type: 
number

getWorldSurface(spacingX, spacingY) → {number}

Get the surface of the rectangle according to a spacing.

Parameters:
NameTypeDescription
spacingXnumber

The X spacing.

spacingYnumber

The Y spacing.

Returns:

The surface of the rectangle multiplied by the given spacing or null for null spacings.

Type: 
number

quantify(viewController, flags) → {object}

Quantify a rectangle according to view information.

Parameters:
NameTypeDescription
viewControllerobject

The associated view controller.

flagsArray

A list of stat values to calculate.

Returns:

A quantification object.

Type: 
object