Your Search Results


    SVG rect interface

    The SVGRect represents rectangular geometry. Rectangles are defined as consisting of a (x,y) coordinate pair identifying a minimum X value, a minimum Y value, and a width and height, which are usually constrained to be non-negative.

    An SVGRect object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.

    Interface overview

    Also implement None
    Methods None
    • float x
    • float y
    • float width
    • float height
    Normative document SVG 1.1 (2nd Edition)


    Name Type Description
    x float The x coordinate of the rectangle, in user units.
    y float The y coordinate of the rectangle, in user units.
    width float The width coordinate of the rectangle, in user units.
    height float The height coordinate of the rectangle, in user units.

    Exceptions on setting: a DOMException with code NO_MODIFICATION_ALLOWED_ERR is Raised on an attempt to change the value of a read only attribute.


    The SVGRect interface do not provide any specific methods.

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
    Basic support ? ? ? ? ?
    Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support ? ? ? ? ?


    Document Tags and Contributors

    Contributors to this page: Sheppy, fscholz, Jeremie, kscarfone
    Last updated by: fscholz,