original_string: function setColor($color, $force = false)
      {
          $new_color = array($color[0], $color[1], $color[2], isset($color[3]) ? $color[3] : null);
  
          if (!$force && $this->currentColor == $new_color) {
              return;
          }
  
          if (isset($new_color[3])) {
              $this->currentColor = $new_color;
              $this->addContent(vsprintf("\n%.3F %.3F %.3F %.3F k", $this->currentColor));
          } else {
              if (isset($new_color[2])) {
                  $this->currentColor = $new_color;
                  $this->addContent(vsprintf("\n%.3F %.3F %.3F rg", $this->currentColor));
              }
          }
      }
code: function setColor($color, $force = false)
      {
          $new_color = array($color[0], $color[1], $color[2], isset($color[3]) ? $color[3] : null);
  
          if (!$force && $this->currentColor == $new_color) {
              return;
          }
  
          if (isset($new_color[3])) {
              $this->currentColor = $new_color;
              $this->addContent(vsprintf("\n%.3F %.3F %.3F %.3F k", $this->currentColor));
          } else {
              if (isset($new_color[2])) {
                  $this->currentColor = $new_color;
                  $this->addContent(vsprintf("\n%.3F %.3F %.3F rg", $this->currentColor));
              }
          }
      }
code_tokens: function setColor ( $ color , $ force = false ) { $ new_color = array ( $ color [ 0 ] , $ color [ 1 ] , $ color [ 2 ] , isset ( $ color [ 3 ] ) ? $ color [ 3 ] : null ) ; if ( ! $ force && $ this -> currentColor == $ new_color ) { return ; } if ( isset ( $ new_color [ 3 ] ) ) { $ this -> currentColor = $ new_color ; $ this -> addContent ( vsprintf ( "\n%.3F %.3F %.3F %.3F k" , $ this -> currentColor ) ) ; } else { if ( isset ( $ new_color [ 2 ] ) ) { $ this -> currentColor = $ new_color ; $ this -> addContent ( vsprintf ( "\n%.3F %.3F %.3F rg" , $ this -> currentColor ) ) ; } } }
docstring: sets the color for fill operations
  
  @param $color
  @param bool $force
docstring_tokens: sets the color for fill operations