Modify a text file: $/richFlag.pde
$/richFlag.pde
//@RMS color yellow =color(200, 200, 0); color blue =color(0, 200, 255); color dblue =color(0, 0, 100); color lblue=color(100, 100, 225); color bgreen =color(0, 150, 150); color red=color(150, 0, 0); color white=color(250, 250, 250); color black=color(0, 0, 0); int xpos1=width/15+50; int ypos1=height/20+50; float sizex=width/1.2; float sizey=height/1.8; int starx=375; int stary=350; PShape star; void setup() //setup { //-- size(1000, 800, P2D); //screen size size(800, 600, P2D); //screen size background(black); //backround } //end setup void draw() { Flag1(); star1( starx, stary ); star1( starx+200, stary+200 ); star1( starx+100, stary+100 ); } void Flag1() { fill(white); stroke(yellow); strokeWeight(3); rect(xpos1, ypos1, width/1.2, height/1.5); //redstripes //-- rect(xpos1, ypos1, width*5/6, height*2/3); //redstripes fill(red); stroke(red); float stripeY=0; for (int j=0; j<13; ++j) { if (j % 2 ==0) fill(255,0,0); else fill(255); rect(xpos1, ypos1+stripeY, width/1.2, height/20); // stripe stripeY += (height*2/3) / 13 ; fill(0); text( ypos1+stripeY, xpos1-100+width*5/6, ypos1+stripeY ); } /* rect(xpos1, ypos1, width/1.2, height/20); //white stripe 1 rect(xpos1, ypos1+height/10, width/1.2, height/20); //white stripe 2 rect(xpos1, ypos1+height/5, width/1.2, height/20); //white stripe 3 rect(xpos1, ypos1+height/3.3, width/1.2, height/20); //white stripe 4 rect(xpos1, ypos1+height/2.45, width/1.2, height/20); //white stripe 5 rect(xpos1, ypos1+height/1.95, width/1.2, height/20); //white stripe 6 rect(xpos1, ypos1+height/1.6, width/1.2, height/20); //white stripe 6 */ fill(dblue); stroke(dblue); rect(xpos1, ypos1, width/2.5, height/3.34); //blue box } void star1( float starx, float stary) { scale(.2); fill(white); stroke(white); strokeWeight(2); beginShape(); vertex(0+starx, -50+stary); vertex(14+starx, -20+stary); vertex(47+starx, -15+stary); vertex(23+starx, 7+stary); vertex(29+starx, 40+stary); vertex(0+starx, 25+stary); vertex(-29+starx, 40+stary); vertex(-23+starx, 7+stary); vertex(-47+starx, -15+stary); vertex(-14+starx, -20+stary); endShape(CLOSE); }