close

Closes the current sub-path by linking its current end point with its start point.

Example - Draw a closed sub-path

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

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

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

    // Draw the next sub-path
    multiPath.moveTo(150, 150).lineTo(200, 150).close();

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

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

In this article