# SolidBrush

## Content

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

***

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

# Class: SolidBrush

Represents a solid brush.

## Extends

- [`Brush`](Brush)

## Constructors

### Constructor

> **new SolidBrush**(`color`): `SolidBrush`

Creates a solid brush with specified color.

#### Parameters

##### color

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

The color of the brush.

#### Returns

`SolidBrush`

#### Overrides

`Brush.constructor`

### Constructor

> **new SolidBrush**(`om`, `color`): `SolidBrush`

Creates a solid brush with specified color.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

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

##### color

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

The color of the brush.

#### Returns

`SolidBrush`

#### Overrides

`Brush.constructor`

## Accessors

### color

#### Get Signature

> **get** **color**(): [`Color`](../type-aliases/Color)

Gets the color of the brush.

##### Returns

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

***

### id

#### Get Signature

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

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

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

***

### 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)
