create

Creates a Point instance from various parameters.

Parameters

x Number|Array|kendo.geometry.Point

Any of the following values:

  • The x coordinate of the point.
  • An array of x and y coordinates.
  • An existing Point instance.
y Number

The y coordinate of the point. Required only if the first argument is a number.

Returns

kendo.geometry.Point The new or supplied Point instance.

Example

<script>
var geom = kendo.geometry;

// Create from coordinates
var point1 = geom.Point.create(10, 20);
console.log(point1.toString()); // outputs: "10 20"

// Create from array
var point2 = geom.Point.create([30, 40]);
console.log(point2.toString()); // outputs: "30 40"

// Create from existing Point
var point3 = geom.Point.create(point1);
console.log(point3.toString()); // outputs: "10 20"
</script>
In this article
create
Not finding the help you need?
Contact Support