O'Reilly logo

Designing SVG Web Graphics by Andrew H. Watt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required