Advertisement
bethdps

Untitled

Oct 4th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. void setup(){
  2. size(800, 600);
  3. background(255);
  4. }
  5.  
  6. void draw(){
  7.   mostraBandeiraBrasil(0, 0, 600);
  8. }  
  9.  
  10. void mostraBandeiraBrasil(int x, int y, int l){
  11.   int m = l/20;
  12.   int a = m*14;
  13.  
  14.  
  15.   fill(0, 169, 89);
  16.   noStroke();
  17.   rect(x, y, l, a);
  18.  
  19.   fill(255, 204, 41);
  20.   int mLos = m+(7*m)/10;
  21.  
  22.   quad(x+l/2, y+mLos,
  23.        x+l-mLos, y+a/2,
  24.        x+l/2, y+a-mLos,
  25.        x+mLos, y+a/2);
  26.  
  27.   fill(62, 64, 149);
  28.   int diametro = round((m*3.5)*2);
  29.   ellipse(x + l/2, y + a/2, diametro, diametro);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement