clip
Gets or sets the element clipping path. Inherited from Element.clip
Parameters
clip kendo.drawing.Path
The element clipping path.
Returns
kendo.drawing.Path
The current element clipping path.
Example
<div id="surface"></div>
<script>
var draw = kendo.drawing;
var geom = kendo.geometry;
var circleGeometry = new geom.Circle([100, 100], 40);
var circle = new draw.Circle(circleGeometry).stroke("blue", 2).fill("lightblue");
// Create a clipping path
var clipPath = new draw.Path()
.moveTo(80, 80)
.lineTo(120, 80)
.lineTo(120, 120)
.lineTo(80, 120)
.close();
// Set the clipping path
circle.clip(clipPath);
// Get the current clipping path
var currentClip = circle.clip();
console.log("Current clip path:", currentClip);
var surface = draw.Surface.create($("#surface"));
surface.draw(circle);
</script>
In this article