@qrcommunication/gigapdf-lib — SDK API reference - v0.110.3
    Preparing search index...

    Interface GradientSpec

    A gradient fill for GigaPdfDoc.addGradient.

    interface GradientSpec {
        kind: "linear" | "radial";
        coords: number[];
        stops: GradientStop[];
        rect: Box;
        extend?: [boolean, boolean];
        opacity?: number;
    }
    Index

    Properties

    kind: "linear" | "radial"

    Axial ("linear") or radial geometry.

    coords: number[]

    [x0,y0,x1,y1] for "linear", [x0,y0,r0,x1,y1,r1] for "radial".

    stops: GradientStop[]

    At least two colour stops.

    rect: Box

    The rectangle { x, y, w, h } filled with the gradient.

    extend?: [boolean, boolean]

    Extend before the first / after the last stop (/Extend; default [true, true]).

    opacity?: number

    Fill opacity 01 (default 1).