Ejemplo n.º 1
0
 /**
  * Sets the fill color
  *
  * @param array $color array(r,g,b)
  */
 protected function _set_fill_color($color)
 {
     if ($this->_last_fill_color == $color) {
         return;
     }
     $this->_last_fill_color = $color;
     list($r, $g, $b) = $color;
     $this->_pdf->setcolor("fill", "rgb", $r, $g, $b, 0);
 }
Ejemplo n.º 2
0
 /**
  * Sets the fill color
  *
  * @param array $color array(r,g,b)
  */
 protected function _set_fill_color($color)
 {
     if ($this->_last_fill_color == $color) {
         return;
     }
     $this->_last_fill_color = $color;
     if (isset($color[3])) {
         $type = "cmyk";
         list($c1, $c2, $c3, $c4) = array($color[0], $color[1], $color[2], $color[3]);
     } elseif (isset($color[2])) {
         $type = "rgb";
         list($c1, $c2, $c3, $c4) = array($color[0], $color[1], $color[2], null);
     } else {
         $type = "gray";
         list($c1, $c2, $c3, $c4) = array($color[0], $color[1], null, null);
     }
     $this->_pdf->setcolor("fill", $type, $c1, $c2, $c3, $c4);
 }
Ejemplo n.º 3
0
 /**
  * Sets the fill color
  *
  * @param array $color array(r,g,b)
  */
 protected function _set_fill_color($color)
 {
     list($r, $g, $b) = $color;
     $this->_pdf->setcolor("fill", "rgb", $r, $g, $b, 0);
 }