Method: setOpacity
Change the icon's opacity

Parameters:
opacity - {float}
185055
function(opacity) {
        OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, null, null, 
                                            null, null, null, null, opacity);

    }
504243
public void setOpacity(double opacity) {
		getLayerInfo().setStyle(Double.toString(opacity));
		handlerManager.fireEvent(new LayerStyleChangeEvent(this));
	}
106952
public void setBackgroundIconColorDefault() {
        if (backgroundIcon == null) {
            LOGGER.warn("Background modification skipped because background icon not set!");
            return;
        }
        stopBackgroundIconColorFadeAnimation();
        backgroundIcon.getStyleClass().clear();
        backgroundIcon.getStyleClass().add(JFXConstants.CSS_ICON);
        backgroundFadeIcon.setFill(Color.TRANSPARENT);
    }
1025034
public static void setTransparency(Element elem, int alpha) {

        float ieVersion = getIEVersion();
        // only IE 8 requires special treatment, older IE versions are no longer supported
        if (ieVersion < 9.0) {
            elem.getStyle().setProperty(
                "-ms-filter",
                "\"progid:DXImageTransform.Microsoft.Alpha(opacity=" + alpha + ")\"");
        } else {
            // Everyone else
            elem.getStyle().setOpacity((1.0 * alpha) / 100);
        }
    }
118495
function() {
        var tvanim = this;

        var s = this.el.style;
        s.opacity = 0.1;
        s.filter = "alpha(opacity=10)";
        s.display = "";

        var dur = 0.4; 
        var a = new YAHOO.util.Anim(this.el, {opacity: {from: 0.1, to: 1, unit:""}}, dur);
        a.onComplete.subscribe( function() { tvanim.onComplete(); } );
        a.animate();
    }
855711
private void adaptTitleContainerVisibility() {
        if (titleContainer != null) {
            if (customTitleView == null && customTitleViewId == -1) {
                titleContainer.setVisibility(
                        !TextUtils.isEmpty(title) || icon != null ? View.VISIBLE : View.GONE);
            } else {
                titleContainer.setVisibility(View.VISIBLE);
            }
        }
    }
1311105
function(opacity) { 
        if (opacity != undefined) {
            this.opacity = opacity; 
        }
        
        if (this.div != null) {
            // for Mozilla and Safari
            this.div.style.opacity = this.opacity;

            // for IE
            this.div.style.filter = 'alpha(opacity=' + this.opacity*100 + ')';
        }
    }
983909
protected int setPaintAlpha(Paint paint, int alpha) {
        final int prevAlpha = paint.getAlpha();
        paint.setAlpha(Ui.modulateAlpha(prevAlpha, alpha));
        return prevAlpha;
    }
620404
def reduce_opacity(img, opacity):
    
    assert opacity >= 0 and opacity <= 1

    if img.mode != 'RGBA':
        img = img.convert('RGBA')
    else:
        img = img.copy()

    alpha = img.split()[3]
    alpha = ImageEnhance.Brightness(alpha).enhance(opacity)
    img.putalpha(alpha)

    return img
176303
def set_icon(self, icon, qtgui_module):
        """"""

        if self._use_fallback:
            icon.addFile(self._fallback)
        else:
            for role, pixmap in self._roles.items():
                if role.endswith("off"):
                    mode = role[:-3]
                    state = qtgui_module.QIcon.Off
                elif role.endswith("on"):
                    mode = role[:-2]
                    state = qtgui_module.QIcon.On
                else:
                    continue

                mode = getattr(qtgui_module.QIcon, mode.title())

                if pixmap:
                    icon.addPixmap(qtgui_module.QPixmap(pixmap), mode, state)
                else:
                    icon.addPixmap(qtgui_module.QPixmap(), mode, state)

        self.icon = icon
366838
function set_opacity($opacity, $mode = "Normal") {
		//Helpers::dompdf_debug("trace", "($opacity, $mode)");
		$this->_set_line_transparency($mode, $opacity);
		$this->_set_fill_transparency($mode, $opacity);
	}
814056
public static void applyMultiIconTo(Drawable icon, int iconColor, Drawable selectedIcon, int selectedIconColor, boolean tinted, ImageView imageView) {
        //if we have an icon then we want to set it
        if (icon != null) {
            //if we got a different color for the selectedIcon we need a StateList
            if (selectedIcon != null) {
                if (tinted) {
                    imageView.setImageDrawable(new PressedEffectStateListDrawable(icon, selectedIcon, iconColor, selectedIconColor));
                } else {
                    imageView.setImageDrawable(UIUtils.getIconStateList(icon, selectedIcon));
                }
            } else if (tinted) {
                imageView.setImageDrawable(new PressedEffectStateListDrawable(icon, iconColor, selectedIconColor));
            } else {
                imageView.setImageDrawable(icon);
            }
            //make sure we display the icon
            imageView.setVisibility(View.VISIBLE);
        } else {
            //hide the icon
            imageView.setVisibility(View.GONE);
        }
    }
337422
public void setIcon(Drawable icon, boolean animation){
        if(icon == null)
            return;

        if(animation) {
            mSwitchIconAnimator.startAnimation(icon);
            invalidate();
        }
        else{
            if(mIcon != null){
                mIcon.setCallback(null);
                unscheduleDrawable(mIcon);
            }

            mIcon = icon;
            float half = mIconSize / 2f;
            mIcon.setBounds((int)(mBackground.getCenterX() - half), (int)(mBackground.getCenterY() - half), (int)(mBackground.getCenterX() + half), (int)(mBackground.getCenterY() + half));
            mIcon.setCallback(this);
            invalidate();
        }
	}
1070391
public void setOverlayOpacity(int alpha) {

        if ((alpha >= 0) && (alpha <= 100) && isAttached()) {
            CmsTransparencyImpl.setTransparency(m_colorOverlay.getElement(), alpha);
        }
    }
1229790
public void setGlowVisible(final boolean GLOW_VISIBLE) {
        getModel().setGlowVisible(GLOW_VISIBLE);
        init(getInnerBounds().width, getInnerBounds().height);
        repaint(getInnerBounds());
    }
1164827
function( opacity ) {
        $.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");
        var world = this.viewer.world;
        for (var i = 0; i < world.getItemCount(); i++) {
            world.getItemAt( i ).setOpacity( opacity );
        }
        return this;
    }
979917
function set_opacity($opacity, $mode = "Normal") {
    if ( $mode === "Normal" ) {
      $gstate = $this->_pdf->create_gstate("opacityfill=$opacity opacitystroke=$opacity");
      $this->_pdf->set_gstate($gstate);
    }
  }