Edit this page

rect

Gets or sets the rectangle defines the image position and size.

Example - resizing the image

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

    var rect = new geom.Rect(
        [10, 10],  // Position of the top left corner
        [240, 240] // Size of the rectangle
    );
    var image = new draw.Image("http://goo.gl/6ov8Gw", rect);

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

    setTimeout(function() {
        image.rect().setSize([120, 120]);
    }, 1000);
</script>

Parameters

value kendo.geometry.RectThe new image rectangle.

Returns

kendo.geometry.Rect The current image rectangle.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy