harfbuzzjs
    Preparing search index...

    Type Alias PaintLinearGradientFunc

    PaintLinearGradientFunc: (
        colorLine: ColorLine,
        x0: number,
        y0: number,
        x1: number,
        y1: number,
        x2: number,
        y2: number,
        paintData: unknown,
        userData: unknown,
    ) => void

    A callback to paint a linear gradient everywhere within the current clip. The coordinates of the points are interpreted according to the current transform; see the OpenType spec COLR section for details on how the points define the direction of the gradient, and how to interpret the colorLine.

    Type Declaration

      • (
            colorLine: ColorLine,
            x0: number,
            y0: number,
            x1: number,
            y1: number,
            x2: number,
            y2: number,
            paintData: unknown,
            userData: unknown,
        ): void
      • Parameters

        • colorLine: ColorLine

          color information for the gradient

        • x0: number

          X coordinate of the first point

        • y0: number

          Y coordinate of the first point

        • x1: number

          X coordinate of the second point

        • y1: number

          Y coordinate of the second point

        • x2: number

          X coordinate of the third point

        • y2: number

          Y coordinate of the third point

        • paintData: unknown

          the data accompanying the paint functions in Font.paintGlyph

        • userData: unknown

          the user data pointer passed to PaintFuncs.setLinearGradientFunc

        Returns void