New to Kendo UI for jQueryStart a free 30-day trial

Returns true if the shape contains the specified point.

Parameters:pointkendo.geometry.Point

The point that should be checked.

Returns:Boolean

value indicating if the shape contains the point.

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

    var rect = new geom.Rect([50, 50], [150, 100]);
    var image = new draw.Image("https://demos.telerik.com/kendo-ui/content/web/editor/tenerife.png", rect);
    
    var point1 = new geom.Point(100, 80);
    var point2 = new geom.Point(250, 200);
    
    console.log("Point 1 in image:", image.containsPoint(point1)); // Should return true
    console.log("Point 2 in image:", image.containsPoint(point2)); // Should return false

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