lineTo

Draws a straight line to the specified absolute coordinates.

Example - Draw a straight sub-path

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

    var multiPath = new draw.MultiPath()
        .moveTo(100, 200);

    // The following commands are interchangeable
    multiPath.lineTo(200, 200);
    multiPath.lineTo([200, 200]);
    multiPath.lineTo(new geom.Point(200, 200));

    multiPath.moveTo(150, 150).lineTo(200, 150).close();

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

Parameters

x Number|Array|kendo.geometry.Point

The line end X coordinate or a Point/Array with X and Y coordinates.

y Number optional

The line end Y coordinate.

Optional if the first parameter is a Point/Array.

Returns

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

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