Class SvgJsRenderer

Hierarchy

Constructors

Properties

backgroundElement?: Rect
container?: string | HTMLElement
svg: Container

Methods

  • A promise that resolves once the fonts used by this renderer have loaded, or undefined if they already have (or can't be loaded in this environment).

    Returns undefined | Promise<unknown>

  • Parameters

    • fromX: number
    • fromY: number
    • toX: number
    • toY: number
    • strokeWidth: number
    • color: string

    Returns void

  • Parameters

    • x: number
    • y: number
    • size: number
    • strokeWidth: number
    • strokeColor: string
    • fill: string
    • edges: number
    • Optional classes: string | string[]

    Returns GraphcisElement

  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number
    • strokeWidth: number
    • strokeColor: string
    • Optional classes: string | string[]
    • Optional fill: string
    • Optional radius: number

    Returns GraphcisElement

  • Parameters

    • text: string | TextSegment[]
    • x: number
    • y: number
    • fontSize: number
    • color: string
    • fontFamily: string
    • alignment: Alignment
    • Optional classes: string | string[]
    • Optional plain: boolean

    Returns GraphcisElement

  • Serialize the current state of the diagram to an SVG string. The returned string is a standalone <svg> document (including the xmlns attribute) and can be written to a file or used without ever attaching it to the DOM.

    Returns string

  • Parameters

    • x: number
    • y: number
    • size: number
    • edges: number

    Returns string

  • Parameters

    • segments: TextSegment[]
    • fontSize: number

    Returns {
        dy: number;
        fontSize: number;
        text: string;
    }[]

Generated using TypeDoc