Skip to content

modern-pdf-lib


modern-pdf-lib / LinearGradientOptions

Interface: LinearGradientOptions

Defined in: src/core/patterns.ts:51

Options for creating a linear gradient (axial shading, ShadingType 2).

Properties

extend?

readonly optional extend: boolean

Defined in: src/core/patterns.ts:69

Whether to extend the gradient beyond the start and end points. Default: true.


stops

readonly stops: readonly (Color | ColorStop)[]

Defined in: src/core/patterns.ts:64

Colour stops. Each element is either a bare Color (positions are distributed evenly) or a ColorStop with an explicit offset.


x1

readonly x1: number

Defined in: src/core/patterns.ts:53

Start X coordinate.


x2

readonly x2: number

Defined in: src/core/patterns.ts:57

End X coordinate.


y1

readonly y1: number

Defined in: src/core/patterns.ts:55

Start Y coordinate.


y2

readonly y2: number

Defined in: src/core/patterns.ts:59

End Y coordinate.

Released under the MIT License.