# ImageBrush

## Content

[**DsPdfJS API v9.1.3**](../README)

***

[DsPdfJS API](../globals) / ImageBrush

# Class: ImageBrush

Represents an image brush.

## Extends

- [`Brush`](Brush)

## Constructors

### Constructor

> **new ImageBrush**(`image`): `ImageBrush`

Creates an image brush based on the [Image](Image) object.

#### Parameters

##### image

[`ImageOrBitmap`](../type-aliases/ImageOrBitmap)

The [Image](Image) object for the brush.

#### Returns

`ImageBrush`

#### Overrides

`Brush.constructor`

### Constructor

> **new ImageBrush**(`om`, `image`): `ImageBrush`

Creates an image brush based on the [Image](Image) object.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

An object manager that controls the lifetime of the ImageBrush object.

##### image

[`ImageOrBitmap`](../type-aliases/ImageOrBitmap)

The [Image](Image) object for the brush.

#### Returns

`ImageBrush`

#### Overrides

`Brush.constructor`

## Accessors

### id

#### Get Signature

> **get** **id**(): `number`

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`Brush`](Brush).[`id`](Brush#id)

***

### image

#### Get Signature

> **get** **image**(): [`ImageOrBitmap`](../type-aliases/ImageOrBitmap)

Gets the image object of the brush.

##### Returns

[`ImageOrBitmap`](../type-aliases/ImageOrBitmap)

***

### om

#### Get Signature

> **get** **om**(): [`ObjectManager`](ObjectManager)

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`Brush`](Brush).[`om`](Brush#om)

***

### type

#### Get Signature

> **get** **type**(): [`BrushType`](../enumerations/BrushType)

Gets the type of the brush.

##### Returns

[`BrushType`](../enumerations/BrushType)

#### Overrides

[`Brush`](Brush).[`type`](Brush#type)

## Methods

### free()

> **free**(): `void`

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`Brush`](Brush).[`free`](Brush#free)

***

### rebind()

> **rebind**(`omTo`): `void`

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`Brush`](Brush).[`rebind`](Brush#rebind)
