v5.20192.631
|

PdfLinearGradientBrush Class

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

Hierarchy

Constructors

Properties

Methods

Constructors

constructor

  • Initializes a new instance of the PdfLinearGradientBrush class.

    Parameters

    • x1: number

      The X-coordinate of the starting point of the linear gradient.

    • y1: number

      The Y-coordinate of the starting point of the linear gradient.

    • x2: number

      The X-coordinate of the ending point of the linear gradient.

    • y2: number

      The Y-coordinate of the ending point of the linear gradient.

    • stops: PdfGradientStop[]

      The PdfGradientStop array to set on this brush.

    • Optional opacity: number

      The opacity of this brush.

    Returns PdfLinearGradientBrush

Properties

opacity

opacity: number

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.

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.

x1

x1: number

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

x2

x2: number

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

y1

y1: number

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

y2

y2: number

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

Methods

clone

equals