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

Method blendColor

core/src/processing/core/PImage.java:1755–1780  ·  view source on GitHub ↗

( begin auto-generated from blendColor.xml ) Blends two color values together based on the blending mode given as the MODE parameter. The possible modes are described in the reference for the blend() function. ( end auto-generated ) Advanced REPLACE - destination co

(int c1, int c2, int mode)

Source from the content-addressed store, hash-verified

1753 * @see PApplet#color(float, float, float, float)
1754 */
1755 static public int blendColor(int c1, int c2, int mode) { // ignore
1756 switch (mode) {
1757 case REPLACE: return c2;
1758 case BLEND: return blend_blend(c1, c2);
1759
1760 case ADD: return blend_add_pin(c1, c2);
1761 case SUBTRACT: return blend_sub_pin(c1, c2);
1762
1763 case LIGHTEST: return blend_lightest(c1, c2);
1764 case DARKEST: return blend_darkest(c1, c2);
1765
1766 case DIFFERENCE: return blend_difference(c1, c2);
1767 case EXCLUSION: return blend_exclusion(c1, c2);
1768
1769 case MULTIPLY: return blend_multiply(c1, c2);
1770 case SCREEN: return blend_screen(c1, c2);
1771
1772 case HARD_LIGHT: return blend_hard_light(c1, c2);
1773 case SOFT_LIGHT: return blend_soft_light(c1, c2);
1774 case OVERLAY: return blend_overlay(c1, c2);
1775
1776 case DODGE: return blend_dodge(c1, c2);
1777 case BURN: return blend_burn(c1, c2);
1778 }
1779 return 0;
1780 }
1781
1782
1783 public void blend(int sx, int sy, int sw, int sh,

Callers 1

blendColorMethod · 0.95

Calls 14

blend_blendMethod · 0.95
blend_add_pinMethod · 0.95
blend_sub_pinMethod · 0.95
blend_lightestMethod · 0.95
blend_darkestMethod · 0.95
blend_differenceMethod · 0.95
blend_exclusionMethod · 0.95
blend_multiplyMethod · 0.95
blend_screenMethod · 0.95
blend_hard_lightMethod · 0.95
blend_soft_lightMethod · 0.95
blend_overlayMethod · 0.95

Tested by

no test coverage detected