Bitbybit Docs
    Preparing search index...

    Interface SvgStyle

    Presentation metadata resolved for an element through the style cascade. Values are normalized but kept close to SVG semantics so callers can use them directly (e.g. colour a 3D shape by fill, or use strokeWidth as extrusion or ribbon thickness, the "strength" of a stroke).

    interface SvgStyle {
        fill?: string;
        stroke?: string;
        strokeWidth?: number;
        strokeDashArray?: number[];
        opacity?: number;
        fillOpacity?: number;
        strokeOpacity?: number;
        fillRule?: "nonzero" | "evenodd";
        hidden?: boolean;
    }
    Index

    Properties

    fill?: string

    Resolved fill colour (e.g. "#ff0000", "none"), or undefined if not set.

    stroke?: string

    Resolved stroke colour, or undefined if not set.

    strokeWidth?: number

    Stroke width in the root's user units, scaled by the element's transforms.

    strokeDashArray?: number[]

    Dash and gap lengths of a dashed stroke, scaled as strokeWidth is; an odd list is repeated once, as SVG draws it. Left out for a solid stroke.

    opacity?: number

    Opacity in [0,1], multiplied down from every ancestor that sets one.

    fillOpacity?: number
    strokeOpacity?: number
    fillRule?: "nonzero" | "evenodd"

    SVG fill rule that governs how holes are determined.

    hidden?: boolean

    True when the element or an ancestor has display:none, or the element resolves to visibility:hidden.