SVGRectElement in SVG 1.1

Represents a <rect ... /> element.

For more information see http://www.w3.org/TR/SVG11/shapes.html#RectElement.

Instance Properties

name type description
attributes NamedNodeMap (read only) [from Node]
childNodes NodeList (read only) [from Node]
className SVGAnimatedString (read only) [from SVGStylable]
externalResourcesRequired SVGAnimatedBoolean (read only) Does the element require external data to be loaded before it can be rendered? [from SVGExternalResourcesRequired]
farthestViewportElement SVGElement (read only) [from SVGLocatable]
firstChild Node (read only) [from Node]
height SVGAnimatedLength (read only)
id String [from SVGElement]
lastChild Node (read only) [from Node]
localName String (read only) [from Node]
namespaceURI String (read only) [from Node]
nearestViewportElement SVGElement (read only) [from SVGLocatable]
nextSibling Node (read only) [from Node]
nodeName String (read only) [from Node]
nodeType Number (read only) [from Node]
nodeValue String [from Node]
ownerDocument Document (read only) [from Node]
ownerSVGElement SVGSVGElement (read only) [from SVGElement]
parentNode Node (read only) [from Node]
prefix String [from Node]
previousSibling Node (read only) [from Node]
requiredExtensions SVGStringList (read only) [from SVGTests]
requiredFeatures SVGStringList (read only) [from SVGTests]
rx SVGAnimatedLength (read only)
ry SVGAnimatedLength (read only)
systemLanguage SVGStringList (read only) [from SVGTests]
tagName String (read only) [from Element]
transform SVGAnimatedTransformList (read only) Represents the transformation applied to this element. [from SVGTransformable]
viewportElement SVGElement (read only) [from SVGElement]
width SVGAnimatedLength (read only)
x SVGAnimatedLength (read only) The location of the left side of the element.
xmlbase String [from SVGElement]
xmllang String [from SVGLangSpace]
xmlspace String [from SVGLangSpace]
y SVGAnimatedLength (read only) The location of the top of the element.

Instance Methods

name returns description
addEventListener(type,listener,useCapture) (none) [from EventTarget]
appendChild(newChild) Node [from Node]
cloneNode(deep) Node Return a new copy of the node. [from Node]
dispatchEvent(evt) Boolean Dispatches an event to the invoking object. [from EventTarget]
getAttribute(name) String [from Element]
getAttributeNode(name) Attr [from Element]
getAttributeNodeNS(namespaceURI,localName) Attr [from Element]
getAttributeNS(namespaceURI,localName) String [from Element]
getBBox() SVGRect Get the bounding box of the element. [from SVGLocatable]
getCTM() SVGMatrix Return the Current Transformation Matrix for the element. [from SVGLocatable]
getElementsByTagName(name) NodeList [from Element]
getElementsByTagNameNS(namespaceURI,localName) NodeList [from Element]
getPresentationAttribute(name) CSSValue [from SVGStylable]
getScreenCTM() SVGMatrix [from SVGLocatable]
getTransformToElement(element) SVGMatrix [from SVGLocatable]
hasAttribute(name) Boolean [from Element]
hasAttributeNS(namespaceURI,localName) Boolean [from Element]
hasAttributes() Boolean [from Node]
hasChildNodes() Boolean [from Node]
hasExtension(extension) Boolean [from SVGTests]
insertBefore(newChild,refChild) Node [from Node]
isSupported(feature,version) Boolean [from Node]
normalize() (none) [from Node]
removeAttribute(name) (none) [from Element]
removeAttributeNode(oldAttr) Attr [from Element]
removeAttributeNS(namespaceURI,localName) (none) [from Element]
removeChild(oldChild) Node [from Node]
removeEventListener(type,listener,useCapture) (none) [from EventTarget]
replaceChild(newChild,oldChild) Node [from Node]
setAttribute(name,value) (none) [from Element]
setAttributeNode(newAttr) Attr [from Element]
setAttributeNodeNS(newAttr) Attr [from Element]
setAttributeNS(namespaceURI,qualifiedName,value) (none) [from Element]

Description

The 'rect' element defines a rectangle which is axis-aligned with the current user coordinate system. Rounded rectangles can be achieved by setting appropriate values for attributes rx and ry. If a properly specified value is provided for rx but not for ry, then the user agent processes the 'rect' element with the effective value for ry as equal to rx. If a properly specified value is provided for ry but not for rx, then the user agent processes the 'rect' element with the effective value for rx as equal to ry. If neither rx nor ry has a properly specified value, then the user agent processes the 'rect' element as if no rounding had been specified, resulting in square corners. If rx is greater than half of the width of the rectangle, then the user agent processes the 'rect' element with the effective value for rx as half of the width of the rectangle. If ry is greater than half of the height of the rectangle, then the user agent processes the 'rect' element with the effective value for ry as half of the height of the rectangle. Do not confuse this object, which corresponds to a <rect ... /> element in SVG, with the SVGRect object. (The latter is used internally to represent a rectangle for various properties, method arguments, and return types.)