SVGPoint

An SVGPoint represents a 2D or 3D point in the SVG coordinate system.

Syntax

retObject = SVGSVGElement.createSVGPoint()

Value

The returned value is an SVGPoint object.

Example

// Create an SVGPoint in the user coordinate system
let s = document.getElementById("SVG-ElementID").createSVGPoint();

// Then, set the x and y values of the returned SVGPoint object
// (which is the variable `s`)
s.y = 10;
s.x = 10;

Browser compatibility

BCD tables only load in the browser