この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。
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 |
| Properties |
|
| Normative document | SVG 1.1 (2nd Edition) |
Properties
| 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.
Methods
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 | ? | ? | ? | ? | ? |

