September 2001
Intermediate to advanced
592 pages
11h 42m
English
The <polygon> element is used for a shape with multiple (at least three) straight sides. Figure 03.15 and the following example show a hexagon with a red stroke and a gray fill.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/PR-SVG-20010719/
DTD/svg10.dtd">
<svg width="400" height="500" >
<polygon style="fill:#CCC; stroke:red; stroke-width:3"
points="150,75 258,137.5 258,262.5
150,325 42,262.5 42,137.5" />
</svg>
|
If you were so inclined, you could create a rectangle ...
Read now
Unlock full access