void setup() { size(450, 100); flag(25,25,80,60,color(0), color(227,0,19), color(255,205,70)); // Germany flag(125,25,80,60,color(255), color(7,32,245), color(255,0,23)); // Russia flag(225,25,90,60,color(178,25,43), color(255), color(31,72,135)); // Netherlands flag(325,25,90,60,color(243,36,61), color(255), color(243,36,61)); // Austria } /* Render a w-by-h flag with top-left corner (x,y). The flag has three horizontal stripes having colors a, b, and c, respectively from top to bottom. */ void flag(int x, int y, int w, int h, color a, color b, color c) { pushStyle(); noStroke(); fill(a); rect(x, y, w, h/3); fill(b); rect(x, y+h/3, w, h/3); fill(c); rect(x, y+2*h/3, w, h/3); stroke(0); noFill(); rect(x, y, w, h); popStyle(); }