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:27

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, in degrees.
endAnglenumberArc end angle, in degrees.

Returns

string

The d value for an SVG path element.


describeCircle()

static describeCircle(x, y, radius): string

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

Creates a circle using an SVG path.

Parameters

ParameterTypeDescription
xnumberArc center x position.
ynumberArc center y position.
radiusnumberArc radius.

Returns

string

The d value for an SVG path element.