MCPcopy Create free account
hub / github.com/benfry/processing4 / blend_blend

Method blend_blend

core/src/processing/core/PImage.java:2431–2440  ·  view source on GitHub ↗

Blend O = S

(int dst, int src)

Source from the content-addressed store, hash-verified

2429 * O = S
2430 */
2431 private static int blend_blend(int dst, int src) {
2432 int a = src >>> 24;
2433
2434 int s_a = a + (a >= 0x7F ? 1 : 0);
2435 int d_a = 0x100 - s_a;
2436
2437 return min((dst >>> 24) + a, 0xFF) << 24 |
2438 ((dst & RB_MASK) * d_a + (src & RB_MASK) * s_a) >>> 8 & RB_MASK |
2439 ((dst & GN_MASK) * d_a + (src & GN_MASK) * s_a) >>> 8 & GN_MASK;
2440 }
2441
2442
2443 /**

Callers 3

blendColorMethod · 0.95
blitResizeBilinearMethod · 0.95
blitResizeNearestMethod · 0.95

Calls 1

minMethod · 0.95

Tested by

no test coverage detected