Skip to main content

Class: SVGUtils

Defined in: src/sdk/graphics/svg/SVGUtils.ts:2

A collection of handy SVG functions.

Constructors

Constructor

new SVGUtils(): SVGUtils

Returns

SVGUtils

Methods

describeArc()

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

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

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

ParameterTypeDescription
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.