New to Kendo UI for jQueryStart a free 30-day trial

FromPoints

class methods

Creates a Rect instance that contains the points given as arguments.

Parameters:pointAkendo.geometry.Point

The first point.

pointBkendo.geometry.Point

The second point.

Multiple arguments are accepted.

Returns:kendo.geometry.Rect

The new Rect instance.

<script>
var geom = kendo.geometry;
var point1 = new geom.Point(5, 10);
var point2 = new geom.Point(20, 5);
var point3 = new geom.Point(15, 25);

// Create rectangle that contains all points
var rect = geom.Rect.fromPoints(point1, point2, point3);

console.log("Rectangle origin:", rect.origin.x, rect.origin.y); // 5, 5
console.log("Rectangle size:", rect.size.width, rect.size.height); // 15, 20
</script>
Not finding the help you need?
Contact Support