1<?php
2/**
3 * Package for building SVG graphics.
4 *
5 * Copyright 2002-2007 The Horde Project (http://www.horde.org/)
6 *
7 * @author  Chuck Hagenbuch <chuck@horde.org>
8 * @package XML_SVG
9 * @license http://www.fsf.org/copyleft/lgpl.html
10 */
11require_once 'XML/SVG/Element.php';
12
13
14
15/**
16 * XML_SVG_Polygon
17 *
18 * @package XML_SVG
19 */
20class XML_SVG_Polygon extends XML_SVG_Element
21{
22
23    var $_points;
24
25    function printElement()
26    {
27        echo '<polygon';
28        $this->printParams('id', 'points', 'style', 'transform');
29        if (is_array($this->_elements)) {
30            // Print children, start and end tag.
31            print(">\n");
32            parent::printElement();
33            print("</polygon>\n");
34        } else {
35            // Print short tag.
36            print("/>\n");
37        }
38    }
39
40    function setShape($points)
41    {
42        $this->_points = $points;
43    }
44
45}
46
47