util.pixelBounds
Static object.
Methods
Name |
Returns |
Description |
Boolean |
Determines whether two rectangular areas intersect. |
|
Boolean |
Determines whether a rectangular area completely contains another rectangular area. |
|
Boolean |
Determines whether a rectangular area contains a point. |
|
Number[][] |
Calculates the rectangular area that everything passed falls inside of. |
|
Number[][] |
Calculates the rectangular area that the passed points fall inside of. |
|
Number[] |
Calculates the center of the rectangular area. |
|
Number[][]|null |
Calculates the intersection of two rectangular areas. |
|
Number[] |
Calculates the dimensions of a rectangular area. |
Methods details
areIntersecting
{Boolean} areIntersecting(bounds1, bounds2)
Determines whether two rectangular areas intersect.
Returns intersection attribute.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Number[][] First area. |
|
— |
Type: Number[][] Second area. |
* Mandatory parameter/option.
containsBounds
{Boolean} containsBounds(outer, inner)
Determines whether a rectangular area completely contains another rectangular area.
Returns inclusion attribute.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Number[][] External area |
|
— |
Type: Number[][] The area being checked. |
* Mandatory parameter/option.
containsPoint
{Boolean} containsPoint(bounds, point)
Determines whether a rectangular area contains a point.
Returns inclusion attribute.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Number[][] External area |
|
— |
Type: Number[] The point being checked. |
* Mandatory parameter/option.
fromBounds
{Number[][]} fromBounds(sourceBounds)
Calculates the rectangular area that everything passed falls inside of.
Returns the calculated area.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Number[][][] Array of rectangular areas |
* Mandatory parameter/option.
fromPoints
{Number[][]} fromPoints(points)
Calculates the rectangular area that the passed points fall inside of.
Returns the calculated area.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Number[][] Array of points. |
* Mandatory parameter/option.
getCenter
{Number[]} getCenter(bounds)
Calculates the center of the rectangular area.
Returns center point in the coordinate system of the input data.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Number[][] Area. |
* Mandatory parameter/option.
getIntersection
{Number[][]|null} getIntersection(bounds1, bounds2)
Calculates the intersection of two rectangular areas.
Returns the rectangular area that is formed by the intersection of the passed areas, or null
if the areas do not intersect.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Number[][] First area. |
|
— |
Type: Number[][] Second area. |
* Mandatory parameter/option.
getSize
{Number[]} getSize(bounds)
Calculates the dimensions of a rectangular area.
Returns size of the area.
Parameters:
Parameter |
Default value |
Description |
— |
Type: Number[][] Area. |
* Mandatory parameter/option.
Mandatory parameter/option.