SheetXL - v1.0.2
    Preparing search index...

    Interface IStroke

    The line drawn along a shape's path: what it is drawn with, how wide, how dashed, and what is drawn at the ends of an open path.

    A stroke is read resolved: what the shape states over what its theme style gives. Every setter writes to the shape and answers with the stroke as it reads afterwards.

    interface IStroke {
        isIStroke: true;
        getAlign(): IStroke.Align;
        getCompound(): IStroke.Compound;
        getDash(): number[] | IStroke.DashStyle;
        getFill(): INone | ISolid | IGradient | IPattern;
        getHead(): LineEnd;
        getLineCap(): IStroke.LineCap;
        getLineJoin(): IStroke.LineJoin;
        getMiterLimit(): number;
        getTail(): LineEnd;
        getWidth(): number;
        isEqual(other: IStroke | null): boolean;
        isVisible(): boolean;
        setDash(
            dash: number[] | IStroke.DashStyle | null,
            options?: ITransaction.OperationOptions,
        ): IStroke;
        setFill(
            fill: IFill.Update,
            options?: ITransaction.OperationOptions,
        ): IStroke;
        setHead(
            head: LineEnd | IStroke.LineEndType | null,
            options?: ITransaction.OperationOptions,
        ): IStroke;
        setLineCap(
            lineCap: IStroke.LineCap | null,
            options?: ITransaction.OperationOptions,
        ): IStroke;
        setLineJoin(
            lineJoin: IStroke.LineJoin | null,
            options?: ITransaction.OperationOptions,
        ): IStroke;
        setTail(
            tail: LineEnd | IStroke.LineEndType | null,
            options?: ITransaction.OperationOptions,
        ): IStroke;
        setWidth(
            width: number | null,
            options?: ITransaction.OperationOptions,
        ): IStroke;
        toCSS(mode?: CSSMode, bounds?: Bounds): Properties;
        toJSON(): IStroke.JSON;
        update(
            update: IStroke.Update,
            options?: ITransaction.OperationOptions,
        ): IStroke;
    }
    Index
    isIStroke: true

    For type checking.

    • The dash: a preset, or a custom pattern of dash and space lengths relative to the width.

      Returns number[] | IStroke.DashStyle

    • The line end drawn at the start of an open path.

      Returns LineEnd

    • The ratio of miter length to width past which a miter join becomes a bevel.

      Returns number

    • The line end drawn at the end of an open path.

      Returns LineEnd

    • The width of the line in points, as Excel measures it. A line that states none is drawn at Excel's implied width.

      Returns number

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

      Parameters

      Returns boolean

    • Whether a line is drawn: a fill that is not none, and a width above zero.

      Returns boolean

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

      Parameters

      • Optionalmode: CSSMode
      • Optionalbounds: Bounds

      Returns Properties

      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)