int: The additional alpha value used in render copy operations.
508881
def alpha_mod(self):
        """"""
        a = ffi.new('Uint8 *')
        check_int_err(lib.SDL_GetTextureAlphaMod(self._ptr, a))
        return a[0]
483332
function () {
        if (this.alpha < 1.0) {
            return "rgba(" + this.rgb.map(function (c) {
                return Math.round(c);
            }).concat(this.alpha).join(', ') + ")";
        } else {
            return '#' + this.rgb.map(function (i) {
                i = Math.round(i);
                i = (i > 255 ? 255 : (i < 0 ? 0 : i)).toString(16);
                return i.length === 1 ? '0' + i : i;
            }).join('');
        }
    }
767303
@ColorInt public static int increaseOpacity(Context context, @ColorRes int res, int alpha) {
        int c = resolveColor(res, context);
        return increaseOpacityFromInt(context, resolveColor(res, context), alpha);
    }
1007913
public static <T extends ImageBase<T>> void plus(T input, double value, T output) {
		if( input instanceof ImageGray) {
			if (GrayU8.class == input.getClass()) {
				PixelMath.plus((GrayU8) input, (int) value, (GrayU8) output);
			} else if (GrayS8.class == input.getClass()) {
				PixelMath.plus((GrayS8) input, (int) value, (GrayS8) output);
			} else if (GrayU16.class == input.getClass()) {
				PixelMath.plus((GrayU16) input, (int) value, (GrayU16) output);
			} else if (GrayS16.class == input.getClass()) {
				PixelMath.plus((GrayS16) input, (int) value, (GrayS16) output);
			} else if (GrayS32.class == input.getClass()) {
				PixelMath.plus((GrayS32) input, (int) value, (GrayS32) output);
			} else if (GrayS64.class == input.getClass()) {
				PixelMath.plus((GrayS64) input, (long) value, (GrayS64) output);
			} else if (GrayF32.class == input.getClass()) {
				PixelMath.plus((GrayF32) input, (float) value, (GrayF32) output);
			} else if (GrayF64.class == input.getClass()) {
				PixelMath.plus((GrayF64) input, value, (GrayF64) output);
			} else {
				throw new IllegalArgumentException("Unknown image Type: " + input.getClass().getSimpleName());
			}
		} else if( input instanceof ImageInterleaved ) {
			if (InterleavedU8.class == input.getClass()) {
				PixelMath.plus((InterleavedU8) input, (int) value, (InterleavedU8) output);
			} else if (InterleavedS8.class == input.getClass()) {
				PixelMath.plus((InterleavedS8) input, (int) value, (InterleavedS8) output);
			} else if (InterleavedU16.class == input.getClass()) {
				PixelMath.plus((InterleavedU16) input, (int) value, (InterleavedU16) output);
			} else if (InterleavedS16.class == input.getClass()) {
				PixelMath.plus((InterleavedS16) input, (int) value, (InterleavedS16) output);
			} else if (InterleavedS32.class == input.getClass()) {
				PixelMath.plus((InterleavedS32) input, (int) value, (InterleavedS32) output);
			} else if (InterleavedS64.class == input.getClass()) {
				PixelMath.plus((InterleavedS64) input, (long) value, (InterleavedS64) output);
			} else if (InterleavedF32.class == input.getClass()) {
				PixelMath.plus((InterleavedF32) input, (float) value, (InterleavedF32) output);
			} else if (InterleavedF64.class == input.getClass()) {
				PixelMath.plus((InterleavedF64) input, value, (InterleavedF64) output);
			} else {
				throw new IllegalArgumentException("Unknown image Type: " + input.getClass().getSimpleName());
			}
		} else {
			Planar in = (Planar)input;
			Planar out = (Planar)output;

			for (int i = 0; i < in.getNumBands(); i++) {
				plus(in.getBand(i),value,out.getBand(i));
			}
		}
	}
71609
public static <T extends ImageGray<T>>
	void applyTransform( T input , int transform[] , int minValue , T output ) {
		InputSanityCheck.checkSameShape(input, output);

		if( input instanceof GrayU8) {
			EnhanceImageOps.applyTransform((GrayU8) input, transform, (GrayU8) output);
		} else if( input instanceof GrayS8) {
			EnhanceImageOps.applyTransform((GrayS8)input,transform,minValue,(GrayS8)output);
		} else if( input instanceof GrayU16) {
			EnhanceImageOps.applyTransform((GrayU16)input,transform,(GrayU16)output);
		} else if( input instanceof GrayS16) {
			EnhanceImageOps.applyTransform((GrayS16)input,transform,minValue,(GrayS16)output);
		} else if( input instanceof GrayS32) {
			EnhanceImageOps.applyTransform((GrayS32)input,transform,minValue,(GrayS32)output);
		} else {
			throw new IllegalArgumentException("Image type not supported. "+input.getClass().getSimpleName());
		}
	}
594163
public void addInt(int value) {
        data[endOffset] = value;
        endOffset++;
        
        // Grow the buffer if needed
        if (endOffset == data.length)
            resize();
        
    }
1146241
def set_alpha(self, alpha):
        """"""
        self.transparency = alpha
        self.diffuse[3] = alpha
        self.ambient[3] = alpha
        self.specular[3] = alpha
        self.emissive[3] = alpha
486792
def rgba_to_int(cls, red, green, blue, alpha):
        
        red = unwrap(red)
        green = unwrap(green)
        blue = unwrap(blue)
        alpha = unwrap(alpha)
        if red is None or green is None or blue is None:
            return None
        if alpha is None:
            alpha = 255
        r = red << 24
        g = green << 16
        b = blue << 8
        a = alpha << 0
        rgba_int = r+g+b+a
        if (rgba_int > (2**31-1)):       # convert to signed 32-bit int
            rgba_int = rgba_int - 2**32
        return rgba_int
1296443
public static <T extends ImageBase<T>> void abs( T input , T output )
	{
		if( input instanceof ImageGray) {
			if (GrayS8.class == input.getClass()) {
				PixelMath.abs((GrayS8) input, (GrayS8) output);
			} else if (GrayS16.class == input.getClass()) {
				PixelMath.abs((GrayS16) input, (GrayS16) output);
			} else if (GrayS32.class == input.getClass()) {
				PixelMath.abs((GrayS32) input, (GrayS32) output);
			} else if (GrayS64.class == input.getClass()) {
				PixelMath.abs((GrayS64) input, (GrayS64) output);
			} else if (GrayF32.class == input.getClass()) {
				PixelMath.abs((GrayF32) input, (GrayF32) output);
			} else if (GrayF64.class == input.getClass()) {
				PixelMath.abs((GrayF64) input, (GrayF64) output);
			}
			// otherwise assume it is an unsigned image type
		} else if( input instanceof ImageInterleaved ) {
			if (InterleavedS8.class == input.getClass()) {
				PixelMath.abs((InterleavedS8) input, (InterleavedS8) output);
			} else if (InterleavedS16.class == input.getClass()) {
				PixelMath.abs((InterleavedS16) input, (InterleavedS16) output);
			} else if (InterleavedS32.class == input.getClass()) {
				PixelMath.abs((InterleavedS32) input, (InterleavedS32) output);
			} else if (InterleavedS64.class == input.getClass()) {
				PixelMath.abs((InterleavedS64) input, (InterleavedS64) output);
			} else if (InterleavedF32.class == input.getClass()) {
				PixelMath.abs((InterleavedF32) input, (InterleavedF32) output);
			} else if (InterleavedF64.class == input.getClass()) {
				PixelMath.abs((InterleavedF64) input, (InterleavedF64) output);
			}
		} else {
			Planar in = (Planar)input;
			Planar out = (Planar)output;

			for (int i = 0; i < in.getNumBands(); i++) {
				abs(in.getBand(i),out.getBand(i));
			}
		}
	}
1323320
private int adjustAlpha(int color, float factor) {
        int alpha = Math.round(Color.alpha(color) * factor);
        int red = Color.red(color);
        int green = Color.green(color);
        int blue = Color.blue(color);
        return Color.argb(alpha, red, green, blue);
    }
670060
def _render_picking(self, **kwargs):
        
        try:
            self._scene.picking = True
            img = self.render(bgcolor=(0, 0, 0, 0), **kwargs)
        finally:
            self._scene.picking = False
        img = img.astype('int32') * [2**0, 2**8, 2**16, 2**24]
        id_ = img.sum(axis=2).astype('int32')
        return id_
1371119
function copyInt_(x,n) {
    var i,c;
    for (c=n,i=0;i<x.length;i++) {
      x[i]=c & mask;
      c>>=bpe;
    }
  }
257660
public final static void writeReverseInt(IoBuffer out, int value) {
        out.putInt((int) ((value & 0xFF) << 24 | ((value >> 8) & 0x00FF) << 16 | ((value >>> 16) & 0x000000FF) << 8 | ((value >>> 24) & 0x000000FF)));
    }
326858
def set_alpha(node, alpha=0.1):
    
    for child_node in node.findall(".//*[@rgba]"):
        rgba_orig = string_to_array(child_node.get("rgba"))
        child_node.set("rgba", array_to_string(list(rgba_orig[0:3]) + [alpha]))
770072
public static BufferedImage checkCopy( BufferedImage original , BufferedImage output ) {
		ColorModel cm = original.getColorModel();
		boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();

		if( output == null || original.getWidth() != output.getWidth() || original.getHeight() != output.getHeight() ||
				original.getType() != output.getType() ) {
			WritableRaster raster = original.copyData(original.getRaster().createCompatibleWritableRaster());
			return new BufferedImage(cm, raster, isAlphaPremultiplied, null);
		}

		original.copyData(output.getRaster());
		return output;
	}
644967
def int_to_alpha(n, upper=True):
    ""
    casenum = 65 if upper else 97
    label = ''
    count= 0
    if n == 0: return str(chr(n + casenum))
    while n >= 0:
        mod, div = n % 26, n
        for _ in range(count):
            div //= 26
        div %= 26
        if count == 0:
            val = mod
        else:
            val = div
        label += str(chr(val + casenum))
        count += 1
        n -= 26**count
    return label[::-1]
893543
function(obj, alpha)
              {
                obj.css({ visibility: alpha > 0 ? 'visible' : 'hidden' });
                if (alpha > 0 && alpha < 100)
                {
                  if (isLessThanIE7)
                  {
                    var src = obj.attr('pngSrc');
                    if (src != null && (src.indexOf('AlphaBar.png') != -1 || src.indexOf('Bars.png') != -1 || src.indexOf('Maps.png') != -1))
                      obj.css({ filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + src + '\', sizingMethod=\'scale\') progid:DXImageTransform.Microsoft.Alpha(opacity=' + alpha + ')' });
                    else obj.css({ opacity: Math.precision(alpha / 100, 4) });
                  }
                  else obj.css({ opacity: Math.precision(alpha / 100, 4) });
                }
                else if (alpha == 0 || alpha == 100)
                {
                  if (isLessThanIE7)
                  {
                    var src = obj.attr('pngSrc');
                    if (src != null && (src.indexOf('AlphaBar.png') != -1 || src.indexOf('Bars.png') != -1 || src.indexOf('Maps.png') != -1))
                      obj.css({ filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + src + '\', sizingMethod=\'scale\')' });
                    else obj.css({ opacity: '' });
                  }
                  else obj.css({ opacity: '' });
                }
              }