clippedBBox

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

Example

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

    var path = new draw.Path()
        .moveTo(50, 50)
        .lineTo(200, 50)
        .lineTo(200, 200)
        .lineTo(50, 200)
        .close();

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

    path.clip(clipPath);

    var clippedBBox = path.clippedBBox();
    console.log("Clipped bounding box:", clippedBBox);

    var surface = draw.Surface.create($("#surface"));
    surface.draw(path);
</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