public function addPolygon($points)
    {
        $pointCount = count($points);

        $this->dataString .= 'M'. 
            number_format($points[0]->x, 2, '.', '') .' '. 
            number_format($points[0]->y, 2, '.', '');

        for ($i = 1; $i < $pointCount; $i++) {
            $this->dataString .= 'L'. 
                number_format($points[$i]->x, 2, '.', '') .' '. 
                number_format($points[$i]->y, 2, '.', '');
        }

        $this->dataString .= 'Z';
    }
public function addPolygon($points)
    {
        $pointCount = count($points);

        $this->dataString .= 'M'. 
            number_format($points[0]->x, 2, '.', '') .' '. 
            number_format($points[0]->y, 2, '.', '');

        for ($i = 1; $i < $pointCount; $i++) {
            $this->dataString .= 'L'. 
                number_format($points[$i]->x, 2, '.', '') .' '. 
                number_format($points[$i]->y, 2, '.', '');
        }

        $this->dataString .= 'Z';
    }
public function addPolygon ( $ points ) { $ pointCount = count ( $ points ) ; $ this -> dataString .= 'M' . number_format ( $ points [ 0 ] -> x , 2 , '.' , '' ) . ' ' . number_format ( $ points [ 0 ] -> y , 2 , '.' , '' ) ; for ( $ i = 1 ; $ i < $ pointCount ; $ i ++ ) { $ this -> dataString .= 'L' . number_format ( $ points [ $ i ] -> x , 2 , '.' , '' ) . ' ' . number_format ( $ points [ $ i ] -> y , 2 , '.' , '' ) ; } $ this -> dataString .= 'Z' ; }
Adds a polygon to the SVG.

@param array(\Jdenticon\Rendering\Point) $points The corners of the
polygon.
Adds a polygon to the SVG .