W3cubDocs

/DOM

SVGPoint

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

Syntax

retObject = SVGElement.createSVGPoint()

Value

The returned value is a SVGPoint object.

Example

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

//then set the x and y values of the returned SVGPoint object which is s
s.y = 10, s.x = 10;

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support Yes ? Yes ? Yes ?
x Yes ? Yes ? Yes ?
y Yes ? Yes ? Yes ?
matrixTransform Yes ? Yes ? Yes ?
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support ? Yes ? Yes Yes ? ?
x ? Yes ? Yes Yes ? ?
y ? Yes ? Yes Yes ? ?
matrixTransform ? Yes ? Yes Yes ? ?

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGPoint