controlOut

Gets or sets the second curve control point of this segment.

The setter returns the current Segment to allow chaining.

Parameters

value kendo.geometry.Point

The new control point.

Returns

kendo.geometry.Point The current control point.

Example

<div id="surface"></div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;

    // Create a curved path
    var path = new draw.Path()
        .moveTo(100, 150)
        .curveTo([150, 100], [200, 200], [250, 150])
        .stroke("orange", 2);

    // Get the second control point of the curve segment
    var currentControlOut = path.segments[0].controlOut();
    console.log("Current controlOut:", currentControlOut.x, currentControlOut.y);

    // Set a new second control point
    path.segments[0].controlOut(new geom.Point(180, 250));
    console.log("New controlOut:", path.segments[0].controlOut().x, path.segments[0].controlOut().y);

    var surface = draw.Surface.create($("#surface"));
    surface.draw(path);
</script>
In this article
controlOut
Not finding the help you need?
Contact Support