This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

SVGRectElement

Summary

The SVGRectElement interface provides access to the properties of the rect element.

Inherits from SVGElementSVGElement

Properties

No properties.

Methods

No methods.

Events

No events.

Inherited from SVGElement

Properties

No properties.

Methods

No methods.

Events

No events.

Inherited from SVGTests

Properties

No properties.

Methods

No methods.

Events

No events.

Inherited from SVGLangSpace

Properties

No properties.

Methods

No methods.

Events

No events.

Inherited from SVGExternalResourcesRequired

Properties

No properties.

Methods

No methods.

Events

No events.

Inherited from SVGStylable

Properties

No properties.

Methods

No methods.

Events

No events.

Inherited from SVGTransformable

Properties

No properties.

Methods

No methods.

Events

No events.

Examples

<?xml version="1.0"?>
<svg width="120" height="120"
     viewPort="0 0 120 120" version="1.1"
     xmlns="http://www.w3.org/2000/svg">

    <rect x="10" y="10" width="100" height="100"/>

</svg>
<?xml version="1.0"?>
<svg width="120" height="120"
     viewPort="0 0 120 120" version="1.1"
     xmlns="http://www.w3.org/2000/svg">

    <rect x="10" y="10"
          width="100" height="100"
          rx="15" ry="15"/>

</svg>

Notes

Remarks

Note: In addition to the attributes, properties, events, methods, and styles listed above, SVG elements also inherent core HTML attributes, properties, events, methods, and styles.

Standards information

Members

The SVGRectElement object has these properties:

  • height: Gets or sets the height of an element.
  • width: Defines the width of an element.
  • x: Gets or sets the x-coordinate value.
  • y: Gets or sets the y-coordinate value.
  • rx: Gets or sets the x-axis radius of a rounded corner rectangle.
  • ry: Gets or sets the y-axis radius of a rounded corner rectangle.

Attributions