---
metadata:
  - name: generator
    content: Diplodoc Platform v5.39.1
alternate:
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md
  - https://yandex.com.tr/dev/jsapi-v2-1/doc/ru/v2-1/ref/reference/util.pixelBounds.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/jsapi-v2-1/doc/en/llms.txt

# util.pixelBounds

Static object.

[Methods](#methods-summary)

## Methods {#methods-summary}

#|
|| **Name** | **Returns** | **Description** ||
|| [areIntersecting](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#areIntersecting)([bounds1](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#areIntersecting-param-bounds1), [bounds2](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#areIntersecting-param-bounds2)) | Boolean | Determines whether two rectangular areas intersect. ||
|| [containsBounds](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#containsBounds)([outer](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#containsBounds-param-outer), [inner](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#containsBounds-param-inner)) | Boolean | Determines whether a rectangular area completely contains another rectangular area. ||
|| [containsPoint](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#containsPoint)([bounds](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#containsPoint-param-bounds), [point](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#containsPoint-param-point)) | Boolean | Determines whether a rectangular area contains a point. ||
|| [fromBounds](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#fromBounds)([sourceBounds](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#fromBounds-param-sourceBounds)) | Number[][] | Calculates the rectangular area that everything passed falls inside of. ||
|| [fromPoints](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#fromPoints)([points](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#fromPoints-param-points)) | Number[][] | Calculates the rectangular area that the passed points fall inside of. ||
|| [getCenter](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#getCenter)([bounds](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#getCenter-param-bounds)) | Number[] | Calculates the center of the rectangular area. ||
|| [getIntersection](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#getIntersection)([bounds1](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#getIntersection-param-bounds1), [bounds2](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#getIntersection-param-bounds2)) | Number[][]\|null | Calculates the intersection of two rectangular areas. ||
|| [getSize](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#getSize)([bounds](https://yandex.com.tr/dev/jsapi-v2-1/doc/en/v2-1/ref/reference/util.pixelBounds.md#getSize-param-bounds)) | Number[] | Calculates the dimensions of a rectangular area.||
|#

## Methods details {#method_detail}

### areIntersecting  {#areIntersecting}

```javascript
{Boolean} areIntersecting(bounds1, bounds2)
```

Determines whether two rectangular areas intersect.

**Returns** intersection attribute.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`bounds1`](#areIntersecting-param-bounds1)[*](*star) | — | Type: Number[][]

First area. ||
|| [`bounds2`](#areIntersecting-param-bounds2)[*](*star) | — | Type: Number[][]

Second area. ||
|#

\* Mandatory parameter/option.

### containsBounds {#containsBounds}

```javascript
{Boolean} containsBounds(outer, inner)
```

Determines whether a rectangular area completely contains another rectangular area.

**Returns** inclusion attribute.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`outer`](#containsBounds-param-outer)[*](*star) | — | Type: Number[][]

External area ||
|| [`inner`](#containsBounds-param-inner)[*](*star) | — | Type: Number[][]

The area being checked. ||
|#

\* Mandatory parameter/option.

### containsPoint {#containsPoint}

```javascript
{Boolean} containsPoint(bounds, point)
```

Determines whether a rectangular area contains a point.

**Returns** inclusion attribute.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`bounds`](#containsPoint-param-bounds)[*](*star) | — | Type: Number[][]

External area ||
|| [`point`](#containsPoint-param-point)[*](*star) | — | Type: Number[]

The point being checked. ||
|#

\* Mandatory parameter/option.

### fromBounds {#fromBounds}

```javascript
{Number[][]} fromBounds(sourceBounds)
```

Calculates the rectangular area that everything passed falls inside of.

**Returns** the calculated area.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`sourceBounds`](#fromBounds-param-sourceBounds)[*](*star) | — | Type: Number[][][]

Array of rectangular areas ||
|#

\* Mandatory parameter/option.

### fromPoints {#fromPoints}

```javascript
{Number[][]} fromPoints(points)
```

Calculates the rectangular area that the passed points fall inside of.

**Returns** the calculated area.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`points`](#fromPoints-param-points)[*](*star) | — | Type: Number[][]

Array of points. ||
|#

\* Mandatory parameter/option.

### getCenter {#getCenter}

```javascript
{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**  ||
|| [`bounds`](#getCenter-param-bounds)[*](*star) | — | Type: Number[][]

Area. ||
|#

\* Mandatory parameter/option.

### getIntersection {#getIntersection}

```javascript
{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**  ||
|| [`bounds1`](#getIntersection-param-bounds1)[*](*star) | — | Type: Number[][]

First area. ||
|| [`bounds2`](#getIntersection-param-bounds2)[*](*star) | — | Type: Number[][]

Second area. ||
|#

\* Mandatory parameter/option.

### getSize {#getSize}

```javascript
{Number[]} getSize(bounds)
```

Calculates the dimensions of a rectangular area.

**Returns** size of the area.

**Parameters:**

#|
|| **Parameter** | **Default value** | **Description**  ||
|| [`bounds`](#getSize-param-bounds)[*](*star) | — | Type: Number[][]

Area. ||
|#

\* Mandatory parameter/option.

[*star]: Mandatory parameter/option.