# RadialGradientBrush

## Content

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

***

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

# Class: RadialGradientBrush

Represents a radial gradient brush.

## Extends

- [`Brush`](Brush)

## Constructors

### Constructor

> **new RadialGradientBrush**(`radialGradientBrushProperties`): `RadialGradientBrush`

Creates a radial gradient brush with specified properties.

#### Parameters

##### radialGradientBrushProperties

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

The settings for creating a radial gradient brush.

#### Returns

`RadialGradientBrush`

#### Overrides

`Brush.constructor`

### Constructor

> **new RadialGradientBrush**(`om`, `radialGradientBrushProperties`): `RadialGradientBrush`

Creates a radial gradient brush with specified properties.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

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

##### radialGradientBrushProperties

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

The settings for creating a radial gradient brush.

#### Returns

`RadialGradientBrush`

#### Overrides

`Brush.constructor`

## Accessors

### centerOfEndCircle

#### Get Signature

> **get** **centerOfEndCircle**(): [`Point`](../type-aliases/Point)

Gets the center of the end circle that defines the end of the gradient.
(0, 0) is the top-left corner, (1, 1) is the bottom-right corner.

##### Returns

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

***

### centerOfStartCircle

#### Get Signature

> **get** **centerOfStartCircle**(): [`Point`](../type-aliases/Point) \| `null`

Gets the center of the start circle that defines the beginning of the gradient.
(0, 0) is the top-left corner, (1, 1) is the bottom-right corner.
If not specified, the center of the start circle coincides with [RadialGradientBrush.centerOfEndCircle](#centerofendcircle).

##### Returns

[`Point`](../type-aliases/Point) \| `null`

***

### endColor

#### Get Signature

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

Gets the ending gradient color.

##### Returns

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

***

### extendEndCircle

#### Get Signature

> **get** **extendEndCircle**(): `boolean`

Gets a value indicating whether to extend gradient beyond the end circle.

##### Returns

`boolean`

***

### extendStartCircle

#### Get Signature

> **get** **extendStartCircle**(): `boolean`

Gets a value indicating whether to extend the gradient beyond the start circle.

##### Returns

`boolean`

***

### gradientStops

#### Get Signature

> **get** **gradientStops**(): [`GradientStop`](../type-aliases/GradientStop)[] \| `null`

Gets the array of gradient stops.

##### Returns

[`GradientStop`](../type-aliases/GradientStop)[] \| `null`

***

### id

#### Get Signature

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

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

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

***

### normalize

#### Get Signature

> **get** **normalize**(): `boolean`

Gets a value indicating whether to normalize the brush ensuring that it renders the same way on all supported
target contexts (such as [PdfContext](PdfContext), [BmpContext](BmpContext), and [SvgContext](SvgContext)).
If true, and the focal point is outside the end circle, it is moved to be on the end circle.
If false, the focal point position is not adjusted if it is outside the end circle,
and the result will depend on the implementation of the target [DrawingContext](DrawingContext).

##### Returns

`boolean`

***

### om

#### Get Signature

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

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

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

***

### radiusOfEndCircle

#### Get Signature

> **get** **radiusOfEndCircle**(): `number` \| `null`

Gets the radius of the end circle that defines the end of the gradient, as a fraction of the normalized diagonal.
The normalized diagonal length is calculated as sqrt(width * width + height * height) / 2.
If not specified, the end radius is equal to max(width, height) / 2.

##### Returns

`number` \| `null`

***

### radiusOfStartCircle

#### Get Signature

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

Gets the radius of the start circle that defines the beginning of the gradient, as a fraction of the normalized diagonal.
The normalized diagonal length is calculated as sqrt(width * width + height * height) / 2.

##### Returns

`number`

***

### startColor

#### Get Signature

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

Gets the starting gradient color.

##### Returns

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

***

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