clip

Gets or sets the element clipping path. Inherited from Element.clip

Example

<div id="surface"></div>
<script>
    var draw = kendo.drawing;
    var geom = kendo.geometry;

    var arcGeometry = new geom.Arc([100, 100], {
        radiusX: 50,
        radiusY: 35,
        startAngle: 45,
        endAngle: 225
    });
    var arc = new draw.Arc(arcGeometry).stroke("purple", 3);

    // Create a clipping path
    var clipPath = new draw.Path().moveTo(75, 75).lineTo(125, 75).lineTo(125, 125).lineTo(75, 125).close();
    
    // Set the clipping path
    arc.clip(clipPath);

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

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

Parameters

clip kendo.drawing.Path

The element clipping path.

Returns

kendo.drawing.Path The current element clipping path.

In this article
clip
Not finding the help you need?
Contact Support