Interface IPatternFill

interface IPatternFill {
    background: AdjustedColor;
    fillType: Pattern;
    foreground: AdjustedColor;
    patternType: SheetPatternType;
    asCSS(darkMode?, bounds?): CSSProperties;
    toJSON(): Partial<{
        background: string | AdjustedColor | Partial<{
            val: string;
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        }>;
        fillType: string;
        foreground: string | AdjustedColor | Partial<{
            val: string;
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        }>;
        patternType: string;
    }>;
}

Hierarchy (view full)

Properties

background: AdjustedColor
fillType: Pattern

If null then the fill type will inherit.

foreground: AdjustedColor

The foreground color for the pattern

patternType: SheetPatternType

Methods

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

    Parameters

    • Optional darkMode: boolean
    • Optional bounds: Bounds

    Returns CSSProperties

    Remarks

    Not all fill styles will offer an exact css equivalent. Additionally due to the nature of css having different properties for the same logic value (for example color, backgroundColor)

  • Returns Partial<{
        background: string | AdjustedColor | Partial<{
            val: string;
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        }>;
        fillType: string;
        foreground: string | AdjustedColor | Partial<{
            val: string;
            adjustments: any;
            asCSS: any;
            isEqual: any;
            isImmutable: any;
            toHSLA: any;
            toHex: any;
            toJSON: any;
            toRGBA: any;
            toString: any;
        }>;
        patternType: string;
    }>