Exemple #1
0
 /**
  * Draw a fileld polygon
  *
  * Draw any filled polygon, filled using the defined color. The color
  * should be passed as an array with the keys "red", "green", "blue" and
  * optionally "alpha". Each key should have a value between 0 and 1
  * associated.
  *
  * The polygon itself is specified as an array of two-tuples, specifying
  * the x and y coordinate of the point.
  * 
  * @param array $points 
  * @param array $color 
  * @return void
  */
 public function drawPolygon(array $points, array $color)
 {
     $this->document->polygon($this->getPointsArray($points), 'F', array(), array('r' => $color['red'] * 255, 'g' => $color['green'] * 255, 'b' => $color['blue'] * 255));
 }