close

Closes the path by linking the current end point with the start point.

Example - Draw a closed path

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

    var path = new draw.Path()
        .moveTo(100, 200)
        .curveTo([100, 100], [250, 100], [250, 200]);

    // The following commands are interchangable
    path.close();
    path.lineTo(100, 200);

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

Returnskendo.drawing.Path The current instance to allow chaining.

In this article