ts-visio - v1.16.27
    Preparing search index...

    Interface StyleProps

    Visual properties for a document-level stylesheet created via doc.createStyle(). All fields are optional — omitted properties are inherited from the parent style (default: Style 0 "No Style").

    interface StyleProps {
        bold?: boolean;
        fillColor?: string;
        fontColor?: string;
        fontFamily?: string;
        fontSize?: number;
        horzAlign?: HorzAlign;
        italic?: boolean;
        lineColor?: string;
        linePattern?: number;
        lineSpacing?: number;
        lineWeight?: number;
        parentFillStyleId?: number;
        parentLineStyleId?: number;
        parentTextStyleId?: number;
        spaceAfter?: number;
        spaceBefore?: number;
        strikethrough?: boolean;
        textMarginBottom?: number;
        textMarginLeft?: number;
        textMarginRight?: number;
        textMarginTop?: number;
        underline?: boolean;
        verticalAlign?: VertAlign;
    }
    Index

    Properties

    bold?: boolean

    Bold text.

    fillColor?: string

    Background fill colour as a CSS hex string.

    fontColor?: string

    Text colour as a CSS hex string.

    fontFamily?: string

    Font family name (e.g. 'Calibri').

    fontSize?: number

    Font size in points.

    horzAlign?: HorzAlign

    Horizontal text alignment within the paragraph.

    italic?: boolean

    Italic text.

    lineColor?: string

    Stroke colour as a CSS hex string (e.g. '#cc0000').

    linePattern?: number

    Line pattern. 0 = none, 1 = solid, 2 = dash, 3 = dot, 4 = dash-dot.

    lineSpacing?: number

    Line-height multiplier (1.0 = single, 1.5 = 1.5×, 2.0 = double).

    lineWeight?: number

    Stroke weight in points. Stored internally as inches (pt / 72).

    parentFillStyleId?: number

    Parent style for fill property inheritance. Defaults to 0 ("No Style").

    parentLineStyleId?: number

    Parent style for line property inheritance. Defaults to 0 ("No Style").

    parentTextStyleId?: number

    Parent style for text property inheritance. Defaults to 0 ("No Style").

    spaceAfter?: number

    Space after each paragraph in points.

    spaceBefore?: number

    Space before each paragraph in points.

    strikethrough?: boolean

    Strikethrough text.

    textMarginBottom?: number

    Bottom text margin in inches.

    textMarginLeft?: number

    Left text margin in inches.

    textMarginRight?: number

    Right text margin in inches.

    textMarginTop?: number

    Top text margin in inches.

    underline?: boolean

    Underline text.

    verticalAlign?: VertAlign

    Vertical text alignment within the shape.