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 rectGeometry = new geom.Rect([0, 0], [100, 100]);
    var rect = new draw.Rect(rectGeometry).fill("red");

    // Create and set a clipping path
    var clipPath = new draw.Path().moveTo(20, 20).lineTo(80, 20).lineTo(80, 80).lineTo(20, 80).close();
    rect.clip(clipPath);

    // Get the current clipping path
    var currentClip = rect.clip();
    console.log("Current clip path:", currentClip);

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