PdfLinearGradientBrush Class

File
wijmo.pdf.js
Module
wijmo.pdf
Base Class
PdfGradientBrush
Show
   

Represents a brush used to fill an area with a linear gradient.

Constructor

Properties

Methods

Constructor

constructor

constructor(x1: number, y1: number, x2: number, y2: number, stops: PdfGradientStop[], opacity: number): PdfLinearGradientBrush

Initializes a new instance of the PdfLinearGradientBrush class.

Parameters
Returns
PdfLinearGradientBrush

Properties

opacity

Gets or sets the opacity of the brush. The value must be in range [0, 1], where 0 indicates that the brush is completely transparent and 1 indicates that the brush is completely opaque. The default value is 1.

Inherited From
PdfGradientBrush
Type
number

stops

Gets or sets an array of PdfGradientStop objects representing a color, offset and opacity within the brush's gradient axis. The default value is an empty array.

Inherited From
PdfGradientBrush
Type
PdfGradientStop[]

x1

Gets or sets the X-coordinate of the starting point of the linear gradient, in page area coordinates, in points.

Type
number

x2

Gets or sets the X-coordinate of the ending point of the linear gradient, in page area coordinates, in points.

Type
number

y1

Gets or sets the Y-coordinate of the starting point of the linear gradient, in page area coordinates, in points.

Type
number

y2

Gets or sets the Y-coordinate of the ending point of the linear gradient, in page area coordinates, in points.

Type
number

Methods

clone

clone(): PdfLinearGradientBrush

Creates a copy of this PdfLinearGradientBrush.

Returns
PdfLinearGradientBrush

equals

equals(value: PdfLinearGradientBrush): boolean

Determines whether the specified PdfLinearGradientBrush instance is equal to the current one.

Parameters
Returns
boolean