Constructor
new Rectangle(begin, end)
Name | Type | Description |
---|---|---|
begin | Point2D | A Point2D representing the beginning of the rectangle. |
end | Point2D | A Point2D representing the end of the rectangle. |
- Source
Classes
Methods
equals(rhs) → {boolean}
Check for equality.
Name | Type | Description |
---|---|---|
rhs | Rectangle | The object to compare to. |
- Source
True if both objects are equal.
- Type:
- boolean
getBegin() → {Point2D}
Get the begin point of the rectangle.
- Source
The begin point of the rectangle.
- Type:
- Point2D
getCentroid() → {Point2D}
Get the centroid of the rectangle.
- Source
The centroid point.
- Type:
- Point2D
getEnd() → {Point2D}
Get the end point of the rectangle.
- Source
The end point of the rectangle.
- Type:
- Point2D
getHeight() → {number}
Get the height of the rectangle.
- Source
The height of the rectangle.
- Type:
- number
getRealHeight() → {number}
Get the real height of the rectangle.
- Source
The real height of the rectangle.
- Type:
- number
getRealWidth() → {number}
Get the real width of the rectangle.
- Source
The real width of the rectangle.
- Type:
- number
getRound() → {object}
Get the rounded limits of the rectangle.
- Source
The rounded limits as {min, max} (Point2D).
- Type:
- object
getSurface() → {number}
Get the surface of the rectangle.
- Source
The surface of the rectangle.
- Type:
- number
getWidth() → {number}
Get the width of the rectangle.
- Source
The width of the rectangle.
- Type:
- number
getWorldSurface(spacing2D) → {number}
Get the surface of the rectangle according to a spacing.
Name | Type | Description |
---|---|---|
spacing2D | Scalar2D | The 2D spacing. |
- Source
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.
Name | Type | Description |
---|---|---|
viewController | ViewController | The associated view controller. |
flags | Array.<string> | A list of stat values to calculate. |
- Source
A quantification object.
- Type:
- object