SVG:rect
From MDC
« SVG Reference home [ Examples | Attributes | Properties | Methods | Related ]
The rect element is an SVG basic shape, used to create rectangles based on the position of a corner and their width and height. It may also be used to create rectangles with rounded corners.
The rect element can be recreated using paths or polyline segments. The exact definition of how to draw a rect using a path (with or without rounded corners) is given in the SVG specification.
[edit] Example
<?xml version="1.0" standalone="no"?>
<svg width="120" height="120" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" width="100" height="100"
rx="10" ry="10"
fill="red" stroke="black"/>
</svg>
[edit] Attributes
|
SVG Presentation : Fill-Stroke Attributes |
|
SVG Presentation : Graphics Attributes |
|
SVG Element Event Attributes |
|
SVG Language Space Attributes |
|
SVG Standard Attributes |
x y width height rx ry class externalResourcesRequired style transform
[edit] Properties
[edit] Methods
[edit] Related
- Elements
- Interfaces
- External Examples