Skip to main content

Class: SVGUtils

A collection of handy SVG functions.

Constructors

constructor

new SVGUtils(): SVGUtils

Returns

SVGUtils

Methods

describeArc

describeArc(x, y, radius, startAngle, endAngle): string

Creates an arc using an SVG path. From https://stackoverflow.com/questions/5736398/how-to-calculate-the-svg-path-for-an-arc-of-a-circle

Parameters

NameTypeDescription
xnumberArc center x position.
ynumberArc center y position.
radiusnumberArc radius.
startAnglenumberArc start angle.
endAnglenumberArc end angle.

Returns

string

The d value for and SVG path element.

Defined in

src/sdk/graphics/svg/SVGUtils.ts:13