Flag of Greece

From ProgZoo
Revision as of 15:44, 18 August 2021 by Andr3w (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

  • 300 by 200
  • 5 blue stripes
function drawFlag(ctx){
}
function drawFlag(ctx){
  let w = 300;
  let h = 200;
  ctx.fillStyle= 'white';
  ctx.fillRect(0,0,300,200);
  ctx.strokeStyle = 'blue';
  ctx.lineWidth = h / 9;
  ctx.moveTo(0, h/18);
  ctx.lineTo(w, h/18);
  ctx.translate(0, 2*h/9);
  ctx.moveTo(0, h/18);
  ctx.lineTo(w, h/18);
  ctx.translate(0, 2*h/9);
  ctx.moveTo(0, h/18);
  ctx.lineTo(w, h/18);
  ctx.translate(0, 2*h/9);
  ctx.moveTo(0, h/18);
  ctx.lineTo(w, h/18);
  ctx.translate(0, 2*h/9);
  ctx.moveTo(0, h/18);
  ctx.lineTo(w, h/18);
  ctx.translate(0, 2*h/9);
  ctx.stroke();
  ctx.translate(0, -5*2*h/9); 
  ctx.fillStyle = 'blue';
  ctx.fillRect(0,0,5*h/9,5*h/9);
  ctx.strokeStyle = 'white';
  ctx.beginPath();
  ctx.moveTo(0,5*h/9/2);
  ctx.lineTo(5*h/9,5*h/9/2);
  ctx.stroke();
}