Skip to content

Instantly share code, notes, and snippets.

@ArthurYidi
Last active August 29, 2015 14:04
Show Gist options
  • Save ArthurYidi/a2a6fbdb59f0580016fc to your computer and use it in GitHub Desktop.
Save ArthurYidi/a2a6fbdb59f0580016fc to your computer and use it in GitHub Desktop.
Processing blendMode()
size(100, 100);
// drawing surface with no background
PGraphics pg = createGraphics(100, 100);
pg.beginDraw();
pg.background(255);
pg.blendMode(DIFFERENCE);
pg.fill(255);
pg.noStroke();
pg.ellipse(40, 50, 30, 30);
pg.ellipse(60, 50, 30, 30);
pg.endDraw();
// display the surface
background(255);
image(pg, 0, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment