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 arcGeometry = new geom.Arc([100, 100], {
radiusX: 30,
radiusY: 30,
startAngle: 0,
endAngle: 180
});
var arc = new draw.Arc(arcGeometry).stroke("blue", 4);
var surface = draw.Surface.create($("#surface"));
surface.draw(arc);
// Test if arc contains specific points
var point1 = new geom.Point(100, 85);
var point2 = new geom.Point(150, 100);
console.log("Point (100, 85) inside arc:", arc.containsPoint(point1));
console.log("Point (150, 100) inside arc:", arc.containsPoint(point2));
</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