containsPoint

Returns true if the shape contains the specified point.

Parameters

point kendo.geometry.Point

The point that should be checked.

Returns

Boolean value indicating if the shape contains the point.

Example

<div id="surface"></div>
<script>
    var draw = kendo.drawing;
    var group = new draw.Group();

    var rect = new draw.Rect(new kendo.geometry.Rect([10, 10], [80, 80]));
    group.append(rect);

    var point = new kendo.geometry.Point(50, 50);
    var contains = group.containsPoint(point);
    console.log("Group contains point (50, 50):", contains);

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