Sets the opacity

@param $opacity
@param $mode
979917
function set_opacity($opacity, $mode = "Normal") {
    if ( $mode === "Normal" ) {
      $gstate = $this->_pdf->create_gstate("opacityfill=$opacity opacitystroke=$opacity");
      $this->_pdf->set_gstate($gstate);
    }
  }
853863
final protected function setWriteMode($mode)
    {
        if (!in_array($mode, [static::WRITE_MODE_INSERT, static::WRITE_MODE_UPSERT, static::WRITE_MODE_UPDATE])) {
            throw new \InvalidArgumentException(sprintf('Passed write mode "%s" is invalid!', $mode));
        }
        $this->writeMode = $mode;
    }
375415
public function setMode($mode)
    {
        $this->mode = $mode;

        if ($this->mode === self::MODE_PRODUCTION) {
            $this->api_endpoint = 'https://api.payex.com';
        } else {
            $this->api_endpoint = 'https://api.externalintegration.payex.com';
        }
    }
1030713
public void setGradationColor(GradationMode2D mode, Color color1, Color color2) {
        setGradation(true);
        if (startColor == null || endColor == null) {
            startColor = new RGBColor(0.0, 0.0, 0.0);
            endColor = new RGBColor(0.0, 0.0, 0.0);
        }
        startColor = color1;
        endColor = color2;
        this.mode = mode;
    }
499620
public function setMutatorVisibility($visibility)
    {
        $visibility = strtolower($visibility);
        if (!in_array($visibility, self::$validVisibilities)) {
            $visibility = self::DEFAULT_VISIBILITY;
        }

        $this->mutatorVisibility = $visibility;
    }
1186662
public function setVisibility(string $visibility)
    {
        if (!in_array($visibility, VisibilityableInterface::VISIBILITY_ALLOWED)) {
            throw new \Exception(sprintf(VisibilityableInterface::ERROR_FORMAT_INVALID_VISIBILITY, $visibility));
        }
        $this->visibility = $visibility;

        return $this;
    }
974912
function setBlendMode(mode, gl) {
         gl = gl || this.gl;
         gl.enable(gl.BLEND);

         switch (mode) {
           case "multiply":
             gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
             this.currentBlendMode = mode;
             break;

           default:
             gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
             this.currentBlendMode = "normal";
             break;
         }
       }
539190
public function setMode(string $mode)
    {
        if (self::VISUAL === $mode) {
            $this->find('css', '#content-tmce')->press();
        } else {
            $this->find('css', '#content-html')->press();
        }
    }
679895
public function setAccessorVisibility($visibility)
    {
        $visibility = strtolower($visibility);
        if (!in_array($visibility, self::$validVisibilities)) {
            $visibility = self::DEFAULT_VISIBILITY;
        }

        $this->accessorVisibility = $visibility;
    }
964440
public void setRenderMode(int renderMode) {

        if ((renderMode < Simapi.RENDER_QUALITY) || (renderMode > Simapi.RENDER_SPEED)) {
            renderMode = Simapi.RENDER_QUALITY;
        }
        m_renderMode = renderMode;
    }
568451
public function setMode($mode) {
		$editMode = ($mode=="on")?true:false;
		//SessionUtils::setMessageEditionMode($editMode);
		if ($editMode) {
			$_SESSION["FINE_MESSAGE_EDITION_MODE"] = true;
			$this->isMessageEditionMode = true;
		} else {
			unset($_SESSION["FINE_MESSAGE_EDITION_MODE"]);
		}

		$this->content->addFile('../utils.i18n.fine/src/views/enableDisableEdition.php', $this);
		$this->template->toHtml();
	}
1095579
function(opacity) {
        if (opacity != this.opacity) {
            this.opacity = opacity;
            for (var i=0, len=this.markers.length; i<len; i++) {
                this.markers[i].setOpacity(this.opacity);
            }
        }
    }
1249195
public static function setNewFileMode(string $mode = '740'): void
    {
        static::init();
        static::$newFileMode = \preg_match('/^[0-7]{3}$/', $mode) ? \intval($mode, 8) : 0740;
    }
1009796
public function opacity(&$image, $opacity)
    {

        if ($image->isAnimated()) { // Ignore animated GIF for now
            return $this;
        }

        // Bounds checks
        $opacity = ($opacity > 1) ? 1 : $opacity;
        $opacity = ($opacity < 0) ? 0 : $opacity;

        $image->getCore()->setImageOpacity($opacity);

        return $this;
    }
531558
public void setColorSelectMode(int mode) {

        if (!isAttached()) {
            return;
        }
        m_colorA.setResource(m_cpImageBundle.bar_white());
        m_colorB.setResource(m_cpImageBundle.bar_white());
        m_colorC.setResource(m_cpImageBundle.bar_white());
        switch (mode) {
            case SATURATIN:
                m_colorD.setResource(m_cpImageBundle.bar_saturation());
                break;

            case BRIGHTNESS:
                m_colorD.setResource(m_cpImageBundle.bar_brightness());
                break;

            case HUE:
                m_colorD.setResource(m_cpImageBundle.bar_hue());
                break;

            case RED:
                m_colorA.setResource(m_cpImageBundle.bar_red_tl());
                m_colorB.setResource(m_cpImageBundle.bar_red_tr());
                m_colorC.setResource(m_cpImageBundle.bar_red_br());
                m_colorD.setResource(m_cpImageBundle.bar_red_bl());
                break;

            case GREEN:
                m_colorA.setResource(m_cpImageBundle.bar_green_tl());
                m_colorB.setResource(m_cpImageBundle.bar_green_tr());
                m_colorC.setResource(m_cpImageBundle.bar_green_br());
                m_colorD.setResource(m_cpImageBundle.bar_green_bl());
                break;

            case BLUE:
                m_colorA.setResource(m_cpImageBundle.bar_blue_tl());
                m_colorB.setResource(m_cpImageBundle.bar_blue_tr());
                m_colorC.setResource(m_cpImageBundle.bar_blue_br());
                m_colorD.setResource(m_cpImageBundle.bar_blue_bl());
                break;
            default:
                break;
        }
    }
226932
public void setMode(long mode) throws IOException {
        setAttributes(
                new NfsSetAttributes(Long.valueOf(mode), null, null, NfsTime.DO_NOT_CHANGE, NfsTime.DO_NOT_CHANGE));
    }
648457
public function setMode($mode)
    {
        Validate::isString($mode, 'mode');
        Validate::isTrue(Mode::isValid($mode), Resources::INVALID_CHANGE_MODE_MSG);

        $this->_mode = $mode;
    }