Polygon in svg defines a polygon based on a given coordinates and style attributes. SvgDreams library has a class for defining a polygon.
$polygonObj = new Polygon("polygon1");
   $polygonObj->strokeWidth = "3";
   $polygonObj->points = "150,75 179,161 269,161 197,215 223,301 150,250 77,301 103,215 31,161 121,161";
   $polygonObj->stroke = "#3b5998";
   $polygonObj->fill = "#fff";
Sample polygon with scale animation:
The PHP code of the polyline above is available in shapes_polygon_0.php.


public function setPoints($points)
Defines the points of the shape
$points: Array of points defining the shape
function __construct($itemId)
Constructor of the polygon class needs an id for the line element. We suggest you to define a unique ID.

All rights reserved. See license