( 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)
| 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, |
no test coverage detected