C

SvgSupport

This class provides methods for parsing and rendering of an svg element.

Inheritance Hierarchy

Members

No filters for this type

Static Methods

Parses and renders an SVG image into the passed containerShape. Translates SVG elements to VSDX shapes while reducing nesting as much as possible.

Note that applying this method to a master shape within an IMasterProvider requires VsdxExportConfiguration.evaluateFormulas to be true so that shapes on a page with this master are scaled properly.

static

Parameters

containerShape: GroupShape

A group shape that functions as container for the inner shapes this method will create. In the created shape hierarchy this container shape corresponds to the outermost SVG element.

svg: Document | Element | string

The SVG image as document, element, or string.

svgWidth: number

The width of the SVG image in pixels.

svgHeight: number

The height of the SVG image in pixels.

media: Media

Return Value

Promise<void>
An empty promise.