[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [controls](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.controls) / [shapes](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.controls#shapes) / [BubbleChart](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.controls.shapes-1.bubblechart) / BubbleRect

# Class: BubbleRect

[shapes](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.controls#shapes).[BubbleChart](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.controls.shapes-1.bubblechart).BubbleRect

Represents a rectangle with sides parallel to the axes. This rectangle has methods that allow the geometry
to be queried and modified. The geometry that makes up a rectangle consists
of two coordinate points that define the diagonal between the left bottom
corner and the right top corner. Note that the bottom vertical coordinate is
guaranteed to be less than the top vertical coordinate, and that the left
horizontal coordinate is less than the right horizontal coordinate.

**`Example`**

```ts
const r1 = new Rect({'x': 4,
'y': 3,
'width': 2,
'height': 1
});

const r2 = new Rect(r1);
const r3 = new Rect(4, 3, 6, 4);  // x1, y1, x2, y2
// r1, r2, and r3 are now equal
```

## Hierarchy

- [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)
↳ **`BubbleRect`**


## Table of contents

Constructors
- [new BubbleRect(x1, y1, x2, y2)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect.md#new bubblerect(x1, y1, x2, y2))


Accessors
| [datax](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#datax) | [datay](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#datay) | [index](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#index) |
|  --- | --- | --- |


Methods
| [clipLine](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#clipline) | [clone](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#clone) | [contains](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#contains) |
|  --- | --- | --- |
| [containsPolygon](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#containspolygon) | [containsRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#containsrect) | [equalsRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#equalsrect) |
| [getBottom](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getbottom) | [getBottomCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getbottomcenter) | [getBounds](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getbounds) |
| [getCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getcenter) | [getCenterX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getcenterx) | [getCenterY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getcentery) |
| [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getclassname) | [getDiagonalLength](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getdiagonallength) | [getHeight](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getheight) |
| [getLeft](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getleft) | [getLeftBottom](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getleftbottom) | [getLeftCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getleftcenter) |
| [getLeftTop](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getlefttop) | [getProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getproperties) | [getRight](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getright) |
| [getRightBottom](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getrightbottom) | [getRightCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getrightcenter) | [getRightTop](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getrighttop) |
| [getTop](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#gettop) | [getTopCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#gettopcenter) | [getWidth](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getwidth) |
| [getX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getx) | [getY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#gety) | [inflate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#inflate) |
| [intersect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#intersect) | [intersects](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#intersects) | [isEmpty](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#isempty) |
| [isReadOnly](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#isreadonly) | [lock](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#lock) | [merge](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#merge) |
| [round](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#round) | [setCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#setcenter) | [setHeight](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#setheight) |
| [setProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#setproperties) | [setRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#setrect) | [setWidth](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#setwidth) |
| [setX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#setx) | [setY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#sety) | [toString](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#tostring) |
| [translate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#translate) | [union](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#union) | [unionPoint](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#unionpoint) |
| [containsRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#containsrect-1) | [fromObject](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#fromobject) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#getclassname-1) |
| [inflateRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#inflaterect) | [intersectsRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#intersectsrect) | [merge](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect#merge-1) |


Css Properties
| Name  | Type  | Description |
|  --- | --- | --- |
| `height` | `number` | Height |
| `readonly` | `boolean` | Readonly |
| `width` | `number` | Width |
| `x` | `number` | Left |
| `y` | `number` | Top |


## Contents

Constructors
#### new BubbleRect(x1, y1, x2, y2)

• **new BubbleRect**(`x1`, `y1`, `x2`, `y2`)

#### Parameters

| Name  | Type  |
|  --- | --- |
| `x1` | `number` |
| `y1` | `number` |
| `x2` | `number` |
| `y2` | `number` |


#### Overrides

Rect.constructor

Accessors
#### datax

• `get` **datax**(): `number`

#### Returns

`number`

• `set` **datax**(`value`): `void`

#### Parameters

| Name  | Type  |
|  --- | --- |
| `value` | `number` |


#### Returns

`void`

#### datay

• `get` **datay**(): `number`

#### Returns

`number`

• `set` **datay**(`value`): `void`

#### Parameters

| Name  | Type  |
|  --- | --- |
| `value` | `number` |


#### Returns

`void`

#### index

• `get` **index**(): `number`

#### Returns

`number`

• `set` **index**(`value`): `void`

#### Parameters

| Name  | Type  |
|  --- | --- |
| `value` | `number` |


#### Returns

`void`

Methods
#### clipLine

▸ **clipLine**(`a1`, `a2`, `result1?`, `result2?`): `number`

Clips a line by rectangle.

a1 [IN] the start position of the line. a2 [IN] the end position of the
line. result1 [OUT] the first point of the clipped line. result2 [OUT]
the end point of the clipped line. return true if clipped rectangle
intersects line or line is inside of the rectangle.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `a1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | the first input point |
| `a2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | the second input point |
| `Optional` `result1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | the first output point |
| `Optional` `result2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | the second output point |


#### Returns

`number`

how many times line intersects rectangle

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[clipLine](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#clipline)

#### clone

▸ **clone**(): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Return clone object.

#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

clone a copy of this object

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[clone](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#clone)

#### contains

▸ **contains**(`x`, `y?`): `boolean`

Check if the area contains point

**`Throws`**

if illegal argument count

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | x position of the point |
| `Optional` `y` | `number` | y position of the point |


#### Returns

`boolean`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[contains](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#contains)

#### containsPolygon

▸ **containsPolygon**(`polygon`): `boolean`

Check if rectangle contains polygon

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `polygon` | [`Polygon`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.polygon.polygon) | polygon |


#### Returns

`boolean`

true if contains, else false

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[containsPolygon](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#containspolygon)

#### containsRect

▸ **containsRect**(`x`, `y`, `w`, `h`): `boolean`

Check if rectangle contains rectangle

**`Throws`**

if illegal argument count

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x position |
| `y` | `number` | y position |
| `w` | `number` | width |
| `h` | `number` | height |


#### Returns

`boolean`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[containsRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#containsrect)

▸ **containsRect**(`rect`): `boolean`

Check if rectangle contains rectangle

**`Throws`**

if illegal argument count

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `rect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | rect |


#### Returns

`boolean`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[containsRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#containsrect)

#### equalsRect

▸ **equalsRect**(`rect`, `epsilon?`): `boolean`

Returns true if rectangles are identical

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `rect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#rect#options) | rect to compare to |
| `Optional` `epsilon` | `number` | acceptance criteria |


#### Returns

`boolean`

equals this and rect have same x, y, width, height

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[equalsRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#equalsrect)

#### getBottom

▸ **getBottom**(): `number`

Return bottom coordinate (always top < bottom)

#### Returns

`number`

y

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getBottom](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getbottom)

#### getBottomCenter

▸ **getBottomCenter**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Return Bottom center position

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

a new point to specify right bottom position

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getBottomCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getbottomcenter)

#### getBounds

▸ **getBounds**(): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Return bounds

#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

bounds

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getBounds](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getbounds)

#### getCenter

▸ **getCenter**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Gets coordinates of the rectangle's center

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

coordinates of the center

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getcenter)

#### getCenterX

▸ **getCenterX**(): `number`

Gets X coordinate of the rectangle's center

#### Returns

`number`

X coordinate of the center

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getCenterX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getcenterx)

#### getCenterY

▸ **getCenterY**(): `number`

Gets Y coordinate of the rectangle's center

#### Returns

`number`

Y coordinate of the center

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getCenterY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getcentery)

#### getClassName

▸ **getClassName**(): `string`

#### Returns

`string`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getclassname)

#### getDiagonalLength

▸ **getDiagonalLength**(): `number`

Get diagonal length of rectangle

#### Returns

`number`

diagonal length

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getDiagonalLength](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getdiagonallength)

#### getHeight

▸ **getHeight**(): `number`

Return height

#### Returns

`number`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getHeight](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getheight)

#### getLeft

▸ **getLeft**(): `number`

Return coordinate of left corner

#### Returns

`number`

x

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getLeft](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getleft)

#### getLeftBottom

▸ **getLeftBottom**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Return left bottom position

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

a new point to specify right bottom position

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getLeftBottom](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getleftbottom)

#### getLeftCenter

▸ **getLeftCenter**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Return Left center position

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

a new point to specify right bottom position

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getLeftCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getleftcenter)

#### getLeftTop

▸ **getLeftTop**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Return left top position

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

a new point to specify left top position

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getLeftTop](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getlefttop)

#### getProperties

▸ **getProperties**(): [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#rect#options)

Gets all the properties pertaining to this object

#### Returns

[`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#rect#options)

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getproperties)

#### getRight

▸ **getRight**(): `number`

Return coordinate of right corner

#### Returns

`number`

x

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getRight](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getright)

#### getRightBottom

▸ **getRightBottom**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Return right bottom position

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

a new point to specify right bottom position

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getRightBottom](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getrightbottom)

#### getRightCenter

▸ **getRightCenter**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Return Right center position

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

a new point to specify right bottom position

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getRightCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getrightcenter)

#### getRightTop

▸ **getRightTop**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Return left top position

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

a new point to specify left top position

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getRightTop](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getrighttop)

#### getTop

▸ **getTop**(): `number`

Return top coordinate

#### Returns

`number`

y

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getTop](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#gettop)

#### getTopCenter

▸ **getTopCenter**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Return Top center position

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

a new point to specify right bottom position

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getTopCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#gettopcenter)

#### getWidth

▸ **getWidth**(): `number`

Return width

#### Returns

`number`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getWidth](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getwidth)

#### getX

▸ **getX**(): `number`

Return left position

#### Returns

`number`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getx)

#### getY

▸ **getY**(): `number`

Return top position

#### Returns

`number`

y

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#gety)

#### inflate

▸ **inflate**(`width`, `height?`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Inflate rectangle from each side by width and height

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `width` | `number` | extend in horizontal direction |
| `Optional` `height` | `number` | extend in vertical direction |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[inflate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#inflate)

#### intersect

▸ **intersect**(`x`, `y`, `width`, `height`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Intersects this rectangle with the specified one

**`Throws`**

if the rect is null or if illegal arguments

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | The x coordinate |
| `y` | `number` | The y coordinate |
| `width` | `number` | The width |
| `height` | `number` | The height |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[intersect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#intersect)

▸ **intersect**(`rect`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Intersects this rectangle with the specified one

**`Throws`**

if the rect is null or if illegal arguments

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `rect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | rectangle to intersect with |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[intersect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#intersect)

#### intersects

▸ **intersects**(`rect`): `boolean`

Determines whether or not this Rectangle and the specified Rectangle
intersection. Two rectangles intersect if their intersection is non-empty or if they touch on either side.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `rect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | The x coordinate or another rectangle |


#### Returns

`boolean`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[intersects](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#intersects)

▸ **intersects**(`x`, `y`, `w`, `h`): `boolean`

Determines whether or not this Rectangle and the specified Rectangle
intersection. Two rectangles intersect if their intersection is non-empty or if they touch on either side.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | The x coordinate |
| `y` | `number` | The y coordinate |
| `w` | `number` | The width |
| `h` | `number` | The height |


#### Returns

`boolean`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[intersects](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#intersects)

#### isEmpty

▸ **isEmpty**(): `boolean`

returns Rect state

#### Returns

`boolean`

true if width or height == 0

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[isEmpty](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#isempty)

#### isReadOnly

▸ **isReadOnly**(): `boolean`

return Rect state. If true, rect cannot be modified.

#### Returns

`boolean`

readOnly

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[isReadOnly](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#isreadonly)

#### lock

▸ **lock**(): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

protect Rect instance from modification.

#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[lock](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#lock)

#### merge

▸ **merge**(`newRect`, `operation?`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Merges with provided rectangular area according to the operation applied.

**`Throws`**

if the rects provided is null

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `newRect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | rect to be merged with the current |
| `Optional` `operation` | [`GeometryOperation`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#geometryoperation) | operation to apply |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[merge](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#merge)

#### round

▸ **round**(): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Round this rectangle to integer values for coordinates.
This method sets the largest whole numbers less than or equal to the current
values of left-top corner and sets the smallest whole numbers greater than or equal
to the current values of right-bottom corner of the rectangle.

#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[round](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#round)

#### setCenter

▸ **setCenter**(`x`, `y`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Sets rectangle center

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | X coordinate of the rectangle's center |
| `y` | `number` | Y coordinate of the rectangle's center |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

the actual instance

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[setCenter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#setcenter)

#### setHeight

▸ **setHeight**(`h`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Sets height

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `h` | `number` | height |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[setHeight](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#setheight)

#### setProperties

▸ **setProperties**(`properties?`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Sets all the properties pertaining to this object

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Optional` `properties` | [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#rect#options) | object containing the properties to set |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[setProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#setproperties)

#### setRect

▸ **setRect**(`rect`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Sets rectangle

**`Throws`**

if illegal argument count

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `rect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#rect#options) | rect or params |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[setRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#setrect)

▸ **setRect**(`x1`, `y1`, `x2`, `y2`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Sets rectangle

**`Throws`**

if illegal argument count

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x1` | `number` | the x-coordinate of one corner |
| `y1` | `number` | the y-coordinate of one corner |
| `x2` | `number` | the x-coordinate of the opposite corner |
| `y2` | `number` | the y coordinate of the opposite corner |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[setRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#setrect)

#### setWidth

▸ **setWidth**(`w`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Sets width

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `w` | `number` | width |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[setWidth](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#setwidth)

#### setX

▸ **setX**(`x`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Set left position

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | left position |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[setX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#setx)

#### setY

▸ **setY**(`y`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Set top position

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `y` | `number` | top position |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[setY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#sety)

#### toString

▸ **toString**(): `string`

Returns string like: "Rect: x1,y1:x2,y2"
With x1 left
With y1 top
With x2 right
With y2 bottom

#### Returns

`string`

string value

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[toString](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#tostring)

#### translate

▸ **translate**(`tx`, `ty`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Translates rectangle a specified distance

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `tx` | `number` | x translation |
| `ty` | `number` | y translation |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[translate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#translate)

#### union

▸ **union**(`rect`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Union this Rect with the specified

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `rect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | The rect to union with current one |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[union](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#union)

#### unionPoint

▸ **unionPoint**(`x`, `y`): [`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

Unions this Rect with the specified x,y-point

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | The x coordinate |
| `y` | `number` | The y coordinate |


#### Returns

[`BubbleRect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.controls.shapes-1.bubblechart.bubblerect)

this

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[unionPoint](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#unionpoint)

#### containsRect

▸ `Static` **containsRect**(`rect1`, `rect2`): `boolean`

Check if rectangle1 contains rectangle2

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `rect1` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | rectangle 1 |
| `rect2` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | rectangle 2 |


#### Returns

`boolean`

true if contains, else false

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[containsRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#containsrect-1)

#### fromObject

▸ `Static` **fromObject**(`object?`): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Create or get rect from object

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Optional` `object` | [`Type`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#rect#type) | object can be in format of constructor of [Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) |


#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

rect

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[fromObject](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#fromobject)

#### getClassName

▸ `Static` **getClassName**(): `string`

#### Returns

`string`

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#getclassname-1)

#### inflateRect

▸ `Static` **inflateRect**(`source`, `w`, `h`): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Inflate rectangle

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `source` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | rect to be inflated |
| `w` | `number` | The width to inflate |
| `h` | `number` | The height to inflate |


#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

a new inflated rectangle

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[inflateRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#inflaterect)

#### intersectsRect

▸ `Static` **intersectsRect**(`rect1`, `rect2`): `boolean`

Check if rectangle1 intersects rectangle2.
Two rectangles intersect if their intersection is non-empty or if they touch on either side.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `rect1` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | rectangle 1 |
| `rect2` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | rectangle 2 |


#### Returns

`boolean`

true if intersects, else false

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[intersectsRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#intersectsrect)

#### merge

▸ `Static` **merge**(`oldRect`, `newRect`, `operation?`, `dstRect?`): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Merges provided rectangular areas according to the operation applied.

**`Throws`**

if either of the rects provided is null

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `oldRect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | 1st rect to merge |
| `newRect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | 2nd rect to merge |
| `Optional` `operation` | [`GeometryOperation`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#geometryoperation) | operation to be performed on the new rect |
| `Optional` `dstRect` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | destination rectangular geometry |


#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

merged rectangular geometry

#### Inherited from

[Rect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect).[merge](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect#merge-1)