clippedBBox

Returns the bounding box of the element with clipping and transformations applied. Inherited from Element.clippedBBox

Example - getting the clipped bounding box

<div id="surface" style="width: 250px; height: 250px;"></div>
<script>
    var draw = kendo.drawing;

    var multiPath = new draw.MultiPath()
        .moveTo(0, 0).lineTo(300, 0).lineTo(300, 300).lineTo(0, 300).close();

    // Create a clipping path
    var clipPath = new draw.Path()
        .moveTo(50, 50).lineTo(200, 50).lineTo(200, 200).lineTo(50, 200).close();

    multiPath.clip(clipPath);
    multiPath.fill("green");

    var bbox = multiPath.bbox();
    var clippedBBox = multiPath.clippedBBox();
    
    console.log("Original bbox: " + bbox.toString());
    console.log("Clipped bbox: " + clippedBBox.toString());

    var surface = draw.Surface.create($("#surface"));
    surface.draw(multiPath);
</script>

Returns

kendo.geometry.Rect The bounding box of the element with clipping transformations applied.

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