clippedBBox

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

Returns

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

Example

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

    var rectGeometry = new geom.Rect([50, 50], [100, 100]);
    var rect = new draw.Rect(rectGeometry).fill("blue");

    // Apply clipping
    var clipPath = new draw.Path().moveTo(60, 60).lineTo(120, 60).lineTo(120, 120).lineTo(60, 120).close();
    rect.clip(clipPath);

    // Get the clipped bounding box
    var clippedBBox = rect.clippedBBox();
    console.log("Clipped bounding box:", clippedBBox.topLeft(), clippedBBox.size);

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