4.8 Basic shapes summarize

4.8.1 Shape Elements
Shape
Description
<line x1="start-x" y1="start-y"x2="end-x" y2="end-y"/>
Draws a line from the starting point at coordinates (start-x, start-y) to the ending point at coordinates (end-x, end-y).
<rect x="left-x" y="top-y" width="width" height="height"/>
Draws a rectangle whose upper left corner is at (left-x, top-y) with the given width and height.
<circle cx="center-x" cy="center-y"r="radius"/>
Draws a circle with the given radius, centered at (center-x, center-y).
<ellipse cx="center-x" cy="center-y"rx="x-radius" ry="y-radius"/>
Draws an ellipse with the given x-radius and y-radius centered at (center-x, center-y).
<polygon points="points-specifications"/>
Draws an arbitrary closed polygon whose outline is described by the points-specification. The points are specified as pairs of x- and y-coordinates. These are user coordinates only; you may not add a length unit specifier.
<polyline points="points-specifications"/>
Draws an arbitrary series of connected lines as described by the points-specification. The points are specified as pairs of x- and y-coordinates. These are user coordinates only; you may not add a length unit specifier.
4.8.2 Stroke and Fill Characteristics
Attribute
Values
stroke
The stroke color.
stroke-width
Width of stroke; may be given as user coordinates or with a length specifier. The stroke width is centered along the abstract grid lines.
stroke-opacity
A number ranging from 0.0 to 1.0; 0.0 is entirely transparent, 1.0 is entirely opaque
stroke-dasharray
A series of numbers that tell the length of dashes and gaps with which a line is to be drawn. These numbers are in user coordinates only
stroke-linecap
Shape of the ends of a line; has one of the values butt (the default), round, or square.
stroke-linejoin
The shape of the corners of a polygon or series of lines; has one of the values miter (pointed; the default), round, or bevel (flat)
stroke-miterlimit
Maximum ratio of length of the miter point to the width of the lines being drawn; the default value is 4.
4.8.3 Stroke and Fill Characteristics
Attribute
Values
fill
The fill color.
fill-opacity
A number ranging from 0.0 to 1.0; 0.0 is entirely transparent, 1.0 is entirely opaque
fill-rule
This attribute can have the values nonzero or evenodd, which apply different rules for determining whether a point is inside or outside a shape. These rules generate different effects only when a shape has intersecting lines or "holes" in it.