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?
readonlyoptionalextend:boolean
Defined in: src/core/patterns.ts:69
Whether to extend the gradient beyond the start and end points. Default: true.
stops
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
readonlyx1:number
Defined in: src/core/patterns.ts:53
Start X coordinate.
x2
readonlyx2:number
Defined in: src/core/patterns.ts:57
End X coordinate.
y1
readonlyy1:number
Defined in: src/core/patterns.ts:55
Start Y coordinate.
y2
readonlyy2:number
Defined in: src/core/patterns.ts:59
End Y coordinate.