Apply a new opacity on the entire raster layer.

@param opacity The new opacity value. Must be a value between 0 and 1, where 0 means invisible and 1 is totally
visible.
@since 1.8.0
504243
public void setOpacity(double opacity) {
		getLayerInfo().setStyle(Double.toString(opacity));
		handlerManager.fireEvent(new LayerStyleChangeEvent(this));
	}
1265461
public static FillInfo createFill(String color, float opacity) {
		FillInfo fillInfo = new FillInfo();
		if (color != null) {
			fillInfo.getCssParameterList().add(createCssParameter("fill", color));
		}
		fillInfo.getCssParameterList().add(createCssParameter("fill-opacity", opacity));
		return fillInfo;
	}
704895
function (params) {
            var clone = this.__clone;
            var opacity = ("opacity" in params) ? params.opacity : 0.5;
            ariaUtilsDom.setOpacity(clone, opacity);

            return clone;
        }
409187
public function get_opacity($opacity = null)
    {
        if ($opacity !== null) {
            $this->set_opacity($opacity);
        }

        return $this->_opacity;
    }
107037
public void setAlphaSliderVisible(boolean visible) {
    if (showAlphaPanel != visible) {
      showAlphaPanel = visible;

      /*
       * Force recreation.
       */
      valShader = null;
      satShader = null;
      alphaShader = null;
      hueBackgroundCache = null;
      satValBackgroundCache = null;

      requestLayout();
    }
  }
293956
public void setVisible(boolean visible)
	{
		if (isVisible() == visible)
			return;

		if (!fireEvent(new VisibleStateChange<>(this, visible)))
			return;

		this.visible = visible;
		if (!visible)
		{
			this.setHovered(false);
			this.setFocused(false);
		}

		return;
	}
445614
public void addOpacityBar(OpacityBar bar) {
		mOpacityBar = bar;
		// Give an instance of the color picker to the Opacity bar.
		mOpacityBar.setColorPicker(this);
		mOpacityBar.setColor(mColor);
	}
533122
function(elem, opacity, animDuration) {
            var self = this;

            // Ensure no animation is running
            //elem.mapElem.stop();
            //if (elem.textElem) elem.textElem.stop();

            // If final opacity is not null, ensure element is shown before proceeding
            if (opacity > 0) {
                elem.mapElem.show();
                if (elem.textElem) elem.textElem.show();
            }

            self.animate(elem.mapElem, {"opacity": opacity}, animDuration, function () {
                // If final attribute is 0, hide
                if (opacity === 0) elem.mapElem.hide();
            });

            self.animate(elem.textElem, {"opacity": opacity}, animDuration, function () {
                // If final attribute is 0, hide
                if (opacity === 0) elem.textElem.hide();
            });
        }
113348
def accel_increase_transparency(self, *args):
        
        transparency = self.settings.styleBackground.get_int('transparency')
        if int(transparency) - 2 > 0:
            self.settings.styleBackground.set_int('transparency', int(transparency) - 2)
        return True
1344544
function(graph, cell, opacity)
	{
		// Fades all children
		var childCount = graph.model.getChildCount(cell);
		
		for (var i=0; i<childCount; i++)
		{
			var child = graph.model.getChildAt(cell, i);
			var childState = graph.getView().getState(child);
			
			if (childState != null)
			{
				mxUtils.setOpacity(childState.shape.node, opacity);
				mxEffects.cascadeOpacity(graph, child, opacity);
			}
		}
		
		// Fades all connected edges
		var edges = graph.model.getEdges(cell);
		
		if (edges != null)
		{
			for (var i=0; i<edges.length; i++)
			{
				var edgeState = graph.getView().getState(edges[i]);
				
				if (edgeState != null)
				{
					mxUtils.setOpacity(edgeState.shape.node, opacity);
				}
			}
		}
	}
930350
public void setBackgroundColor(int color) {
        setBackgroundColorR(Colors.byteToGl(Color.red(color)));
        setBackgroundColorG(Colors.byteToGl(Color.green(color)));
        setBackgroundColorB(Colors.byteToGl(Color.blue(color)));
        setBackgroundColorA(Colors.byteToGl(Color.alpha(color)));
    }
979917
function set_opacity($opacity, $mode = "Normal") {
    if ( $mode === "Normal" ) {
      $gstate = $this->_pdf->create_gstate("opacityfill=$opacity opacitystroke=$opacity");
      $this->_pdf->set_gstate($gstate);
    }
  }
234560
public void setIndicatorVisibility(IndicatorVisibility visibility){
        if(visibility == IndicatorVisibility.Visible){
            setVisibility(View.VISIBLE);
        }else{
            setVisibility(View.INVISIBLE);
        }
        resetDrawable();
    }
846308
def target_opacity(self, value):
        

        if value is not None:
            assert type(value) is float, "'{0}' attribute: '{1}' type is not 'float'!".format("target_opacity", value)
            assert value >= 0, "'{0}' attribute: '{1}' need to be positive!".format("target_opacity", value)
            assert value <= 1, "'{0}' attribute: '{1}' need to be less or equal than '1'!".format(
                "target_opacity", value)
        self.__target_opacity = value
205025
function(node, from, remove, step, delay, isEnabled)
	{
		step = step || 40;
		delay = delay || 30;
		
		var opacity = from || 100;
		
		mxUtils.setOpacity(node, opacity);
		
		if (isEnabled || isEnabled == null)
		{
			var f = function()
			{
			    opacity = Math.max(opacity-step, 0);
				mxUtils.setOpacity(node, opacity);
				
				if (opacity > 0)
				{
					window.setTimeout(f, delay);
				}
				else
				{
					node.style.visibility = 'hidden';
					
					if (remove && node.parentNode)
					{
						node.parentNode.removeChild(node);
					}
				}
			};
			window.setTimeout(f, delay);
		}
		else
		{
			node.style.visibility = 'hidden';
			
			if (remove && node.parentNode)
			{
				node.parentNode.removeChild(node);
			}
		}
	}
803407
def alpha(self, opacity=None):
        """"""
        if opacity is None:
            return self.GetProperty().GetOpacity()

        self.GetProperty().SetOpacity(opacity)
        bfp = self.GetBackfaceProperty()
        if bfp:
            if opacity < 1:
                self._bfprop = bfp
                self.SetBackfaceProperty(None)
            else:
                self.SetBackfaceProperty(self._bfprop)
        return self
418147
public static Expression opacify(Generator generator, FunctionCall input) {
        Color color = input.getExpectedColorParam(0);
        float amount = input.getExpectedFloatParam(1);
        return new Color(color.getR(), color.getG(), color.getB(), color.getA() + amount);
    }