meo-canvas - v8.0.1
    Preparing search index...

    Type Alias Gradient

    Gradient:
        | {
            colors: readonly string[];
            direction: GradientDirection;
            type: "linear";
        }
        | {
            colors: readonly string[];
            direction?: GradientDirection;
            type: "radial";
        }

    A gradient, as a background fill or as the alpha of a Mask.

    Colours are spread evenly from the first to the last; a single colour sits at the midpoint. A radial gradient runs from the node's centre to the corner, so it covers the whole box.

    Type Declaration

    • { colors: readonly string[]; direction: GradientDirection; type: "linear" }
      • colors: readonly string[]

        Stops in order, spread evenly from the first to the last.

      • direction: GradientDirection

        Which way the run goes — a named edge-to-edge direction, or explicit endpoints.

      • type: "linear"

        A straight run between two points.

    • { colors: readonly string[]; direction?: GradientDirection; type: "radial" }
      • colors: readonly string[]

        Stops in order, from the centre outwards.

      • Optionaldirection?: GradientDirection

        Unused for a radial gradient, which always runs centre to corner.

      • type: "radial"

        A run outward from the node's centre, reaching the corners.