The <polyline> Element

A <polyline> element can create any shape that consists of only straight lines drawn sequentially. The following simple example draws three sides of the rectangle you created in an earlier example. If you omit any mention of the fill property, a black and fully opaque fill is inserted. In this example (illustrated in Figure 03.14), I have created an almost transparent fill of the same color as the stroke.

Figure 03.14. A <polyline> element that creates three sides of a square and has a fill that is 90 percent transparent.

Listing 3.16. (Polyline01.svg)
 <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD ...

Get Designing SVG Web Graphics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.