src/Thujohn/Pdf/dompdf/include/pdflib_adapter.cls.php
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);
  }
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);
  }
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 ) ; }
Sets the fill color

@param array $color array(r,g,b)
Sets the fill color