/* * Demonstration of placing a piece of one photo into another. */ PImage slu = loadImage("http://business.slu.edu/uploads/2012/11/08/slu-homepage-campus4.jpg"); int w = slu.width; int h = slu.height; PGraphics mask = createGraphics(w, h); mask.beginDraw(); mask.fill(255); // although this is already the default mask.strokeWeight(1); // although this is already the default mask.background(0); mask.beginShape(); mask.vertex(216, 14); mask.vertex(226, 38); mask.vertex(226, 160); mask.vertex(206, 160); mask.vertex(206, 38); mask.endShape(CLOSE); mask.endDraw(); slu.mask(mask); PImage clock = slu.get(205, 13, 22, 148); size(992, 558); PImage dc = loadImage("http://a.abcnews.go.com/images/Politics/gty_washington_monument_kb_1405012_16x9_992.jpg"); image(dc, 0, 0); scale(2.25); image(clock, 208, 3); scale(1, -1); image(clock, 208, -315);