new Rectangle(begin, end)
- Source:
Rectangle shape.
Parameters:
Name | Type | Description |
---|---|---|
begin |
dwv.math.Point2D | A Point2D representing the beginning of the rectangle. |
end |
dwv.math.Point2D | A Point2D representing the end of the rectangle. |
Methods
equals(rhs) → {boolean}
- Source:
Check for equality.
Parameters:
Name | Type | Description |
---|---|---|
rhs |
dwv.math.Rectangle | The object to compare to. |
Returns:
True if both objects are equal.
- Type
- boolean
getBegin() → {dwv.math.Point2D}
- Source:
Get the begin point of the rectangle.
Returns:
The begin point of the rectangle
- Type
- dwv.math.Point2D
getEnd() → {dwv.math.Point2D}
- Source:
Get the end point of the rectangle.
Returns:
The end point of the rectangle
- Type
- dwv.math.Point2D
getHeight() → {number}
- Source:
Get the height of the rectangle.
Returns:
The height of the rectangle.
- Type
- number
getRealHeight() → {number}
- Source:
Get the real height of the rectangle.
Returns:
The real height of the rectangle.
- Type
- number
getRealWidth() → {number}
- Source:
Get the real width of the rectangle.
Returns:
The real width of the rectangle.
- Type
- number
getRound() → {object}
- Source:
Get the rounded limits of the rectangle.
Returns:
The rounded limits.
- Type
- object
getSurface() → {number}
- Source:
Get the surface of the rectangle.
Returns:
The surface of the rectangle.
- Type
- number
getWidth() → {number}
- Source:
Get the width of the rectangle.
Returns:
The width of the rectangle.
- Type
- number
getWorldSurface(spacingX, spacingY) → {number}
- Source:
Get the surface of the rectangle according to a spacing.
Parameters:
Name | Type | Description |
---|---|---|
spacingX |
number | The X spacing. |
spacingY |
number | 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}
- Source:
Quantify a rectangle according to view information.
Parameters:
Name | Type | Description |
---|---|---|
viewController |
object | The associated view controller. |
flags |
Array | A list of stat values to calculate. |
Returns:
A quantification object.
- Type
- object