MCPcopy Index your code
hub / github.com/processing/processing / blend_blend

Method blend_blend

core/src/processing/core/PImage.java:2578–2587  ·  view source on GitHub ↗

Blend O = S

(int dst, int src)

Source from the content-addressed store, hash-verified

2576 * O = S
2577 */
2578 private static int blend_blend(int dst, int src) {
2579 int a = src >>> 24;
2580
2581 int s_a = a + (a >= 0x7F ? 1 : 0);
2582 int d_a = 0x100 - s_a;
2583
2584 return min((dst >>> 24) + a, 0xFF) << 24 |
2585 ((dst & RB_MASK) * d_a + (src & RB_MASK) * s_a) >>> 8 & RB_MASK |
2586 ((dst & GN_MASK) * d_a + (src & GN_MASK) * s_a) >>> 8 & GN_MASK;
2587 }
2588
2589
2590 /**

Callers 2

blendColorMethod · 0.95
blit_resizeMethod · 0.95

Calls 1

minMethod · 0.95

Tested by

no test coverage detected