Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace SVG

The SVG module provides utility functions for generating the necessary HTML for various SVG elements based on certain configurations and styles.

Index

Functions

Const calculateTextSize

  • calculateTextSize(str: string, fontSize: number, fontStyle?: string, padding?: number[]): number[]
  • Parameters

    • str: string
    • fontSize: number
    • Optional fontStyle: string
    • Optional padding: number[]

    Returns number[]

Const circle

  • Returns the SVG circle string for the specified style options.

    memberof

    SVG

    Parameters

    Returns string

Const draw

  • draw(width: number, height: number, opts: any): string
  • Returns the SVG HTML string using the specified size and options.

    memberof

    SVG

    Parameters

    • width: number
    • height: number
    • opts: any

    Returns string

Const image

  • Parameters

    Returns string

Const path

  • Returns the SVG path string using the specified path value string and style options.

    memberof

    SVG

    Parameters

    Returns string

Const rect

  • Returns the SVG rectangle string for the specified width, height and style options.

    memberof

    SVG

    Parameters

    Returns string

Const svg

  • svg(width: number, height: number, elements: string[], viewBox?: string): string
  • Returns the SVG HTML string for the specified options and array of drawable elements.

    memberof

    SVG

    Parameters

    • width: number
    • height: number
    • elements: string[]
    • Default value viewBox: string = null

    Returns string

Const text

  • Returns the SVG text string for the specified value and style options.

    memberof

    SVG

    Parameters

    Returns string

Generated using TypeDoc