Skip to content
Shapemetry

Io - SVG dialect

API reference — the SVG dialect doors of @huukhanhnguyen/io: readers, writers and their option / result types, all on this page.

import { arcToCubics, assertSupportedPath } from '@huukhanhnguyen/io'

Source: ./svgDialect. See all formats or the Guide.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

arcToCubics

function

arcToCubics(arc: SvgArc): [number, number, number, number, number, number][]

assertSupportedPath

function

assertSupportedPath(d: string, format: string): void

ATTR_PATTERN

const

const ATTR_PATTERN: RegExp

ELEMENT_PATTERN

const

const ELEMENT_PATTERN: RegExp

parseAttrs

function

parseAttrs(attrText: string): Record<string, string>

PATH_SUPPORTED_PATTERN

const

const PATH_SUPPORTED_PATTERN: RegExp

svgArcToCenter

function

svgArcToCenter(from: [number, number], parameters: number[], format: string): SvgArc | null

unescapeXml

function

unescapeXml(text: string): string
Last updated: 📖 1 min readEdit on GitHub