Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1098521 of SVGPoint

  • Revision slug: Web/API/SVGPoint
  • Revision title: SVGPoint
  • Revision id: 1098521
  • Created:
  • Creator: Tonyshih
  • Is current revision? Yes
  • Comment
Tags: 

Revision Content

{{APIRef("SVG")}}

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;

 

 

Revision Source

<div>{{APIRef("SVG")}}</div>

<p>An <code>SVGPoint</code> represents a 2D or 3D point in the SVG coordinate system.</p>

<h2 id="Syntax">Syntax</h2>

<pre>
retObject = SVGElement.createSVGPoint()</pre>

<h3 id="Value">Value</h3>

<p>The returned value is a SVGPoint object.</p>

<h2 id="Example">Example</h2>

<pre class="brush: js">
//create the SVGPoint in the user coordinate system&nbsp;
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;
</pre>

<p>&nbsp;</p>

<p>&nbsp;</p>
Revert to this revision