SheetXL - v1.0.2
    Preparing search index...

    Interface IImage

    An image fill: a workbook resource stretched over the area or tiled across it.

    The image is a resource of the workbook, so the fill cannot be set from a color or a string; a shape takes one from a file or through its own picture operations. Setting a color on an image fill replaces it with a solid one.

    interface IImage {
        isIFill: true;
        getColor(): IColor | null;
        getResource(): IResource | null;
        getType(): "image";
        hasVisibleStyling(): boolean;
        isEqual(other: IFill | null): boolean;
        isTiled(): boolean;
        setColor(
            color: Serializable | null,
            options?: ITransaction.OperationOptions,
        ): IFill;
        toCSS(mode?: CSSMode, size?: Size): Properties;
        toJSON(): IFill.ImageJSON;
    }

    Hierarchy (View Summary)

    Index
    isIFill: true

    For type checking.

    • The image, when whatever holds the fill holds the resource; null when the fill names none or the holder cannot answer.

      Returns IResource | null

    • Returns true if the fill has any visible styling

      Returns boolean

    • Returns true if the fill is equal to the other fill.

      Parameters

      Returns boolean

    • Whether the image repeats across the area rather than stretching over it.

      Returns boolean

    • Returns the fill as a set of css string that are suitable for css.

      Parameters

      • Optionalmode: CSSMode

        The color rendering mode (see IColor.CSSMode): a boolean bakes that mode; 'adaptive' emits light-dark() so a light/dark flip needs no re-render. (Pattern fills bake their SVG data-URI body regardless — a data-URI never sees the host color-scheme.)

      • Optionalsize: Size

        Indicates the size of the area being filled.

      Returns Properties

      Size is used for determining the scaling or tiling of the fill within the specified area. (e.g. Scaled Gradient Fill).