Lines Matching refs:alpha
35 * To compensate for the effect, we recompute the alpha value of the src image before applying
58 private float alpha;
65 private BlendComposite(BlendingMode mode, float alpha) {
67 setAlpha(alpha);
74 public static BlendComposite getInstance(BlendingMode mode, float alpha) {
75 if (alpha > 0.9999f) {
78 return new BlendComposite(mode, alpha);
82 return alpha;
89 private void setAlpha(float alpha) {
90 if (alpha < 0.0f || alpha > 1.0f) {
92 "alpha must be comprised between 0.0f and 1.0f");
95 this.alpha = alpha;
100 return Float.floatToIntBits(alpha) * 31 + mode.ordinal();
111 return mode == bc.mode && alpha == bc.alpha;
143 float alpha = composite.getAlpha();
153 if (alpha != 0) {
178 if (alpha == 1) {
185 ((int) (dstPixel[3] + (result[3] - dstPixel[3]) * alpha) & 0xFF) << 24 |
186 ((int) (dstPixel[0] + (result[0] - dstPixel[0]) * alpha) & 0xFF) << 16 |
187 ((int) (dstPixel[1] + (result[1] - dstPixel[1]) * alpha) & 0xFF) << 8 |
188 (int) (dstPixel[2] + (result[2] - dstPixel[2]) * alpha) & 0xFF;