Edit this page

moveTo

Creates a new sub-path or clears all segments and moves the starting point to the specified absolute coordinates.

Example - Set the sub-path start coordinates

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

    var multiPath = new draw.MultiPath();

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

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

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

Parameters

x Number |Array |kendo.geometry.PointThe starting X coordinate or a Point/Array with X and Y coordinates.
y Number optionalThe starting Y coordinate.

Optional if the first parameter is a Point/Array.

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

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy