function setFillTransparency($mode, $opacity) {
    static $blend_modes = array("Normal", "Multiply", "Screen",
                                "Overlay", "Darken", "Lighten",
                                "ColorDogde", "ColorBurn", "HardLight",
                                "SoftLight", "Difference", "Exclusion");

    if ( !in_array($mode, $blend_modes) )
      $mode = "Normal";

    if ( $mode === $this->currentFillTransparency["mode"]  &&
         $opacity == $this->currentFillTransparency["opacity"] )
      return;
      
    $this->currentFillTransparency["mode"] = $mode;
    $this->currentFillTransparency["opacity"] = $opacity;

    $options = array("BM" => "/$mode",
                     "ca" => (float)$opacity);
    
    $this->setGraphicsState($options);
  }