fromPoints

Create a straight path from the given points.

Example

<div id="surface" style="width: 250px; height: 250px;"></div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;

    var points = [
        new geom.Point(50, 50),
        new geom.Point(150, 100),
        new geom.Point(200, 50),
        new geom.Point(250, 150)
    ];

    var path = draw.Path.fromPoints(points, {
        stroke: {
            color: "#2ecc71",
            width: 2
        }
    });

    var surface = draw.Surface.create($("#surface"));
    surface.draw(path);
</script>

Parameters

points Array

Array of kendo.geometry.Point objects or [x, y] arrays.

options Object optional

The configuration options for the path.

Returns

kendo.drawing.Path The newly constructed path.

In this article
fromPoints
Not finding the help you need?
Contact Support