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
-
Parameters
Returns string
Const draw
- draw(width: number, height: number, opts: any): string
-
Parameters
-
width: number
-
height: number
-
opts: any
Returns string
Const image
-
Parameters
-
url: string
-
container: Size
-
Returns string
Const path
-
Parameters
Returns string
Const rect
-
Parameters
-
width: number
-
height: number
-
Returns string
Const svg
- svg(width: number, height: number, elements: string[], viewBox?: string): string
-
Parameters
-
width: number
-
height: number
-
elements: string[]
-
Default value viewBox: string = null
Returns string
Const text
-
Parameters
-
value: string | number
-
container: Size
-
Returns string
The
SVG
module provides utility functions for generating the necessary HTML for various SVG elements based on certain configurations and styles.