Ejemplo n.º 1
0
 /**
  * Draw border as a polygon
  * 
  * @param awDriver $driver A Driver object
  * @param awPolygon $polygon A Polygon object
  */
 public function polygon(awDriver $driver, awPolygon $polygon)
 {
     // Border is hidden
     if ($this->hide) {
         return;
     }
     $polygon->setStyle($this->style);
     $driver->polygon($this->color, $polygon);
     // In case of Line::SOLID, Driver::polygon() uses imagepolygon()
     // which automatically closes the shape. In any other case,
     // we have to do it manually here.
     if ($this->style !== Line::SOLID) {
         $this->closePolygon($driver, $polygon);
     }
 }