SVGRectElement in SVG 1.1
Represents a <rect ... />
element.
For more information see http://www.w3.org/TR/SVG11/shapes.html#RectElement.
Instance Properties
Instance Methods
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.)