containsPoint

Returns true if the shape contains the specified point.

Example

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

    var circle = new draw.Circle(new geom.Circle([100, 100], 50), {
        fill: { color: "lightblue" }
    });

    var pointInside = new geom.Point(100, 100);
    var pointOutside = new geom.Point(200, 200);

    console.log("Point (100,100) inside circle:", circle.containsPoint(pointInside));
    console.log("Point (200,200) inside circle:", circle.containsPoint(pointOutside));

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

Parameters

point kendo.geometry.Point

The point that should be checked.

Returns

Boolean value indicating if the shape contains the point.

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