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"></div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;

    var position = new geom.Point(50, 50);
    var text = new draw.Text("Click to test", position, {
        font: "16px Arial"
    });

    var surface = draw.Surface.create($("#surface"));
    surface.draw(text);

    $("#surface").click(function(e) {
        var offset = $(this).offset();
        var point = new geom.Point(e.pageX - offset.left, e.pageY - offset.top);
        var contains = text.containsPoint(point);
        console.log("Text contains point:", contains);
    });
</script>
Not finding the help you need?
Contact Support