Difference between revisions of "Flags: Worked Examples"

From ProgZoo
Jump to navigation Jump to search
Tag: Reverted
Tag: Reverted
Line 1: Line 1:
<pre id='shellbody' data-qtp='canvas'></pre>
<pre id='shellbody' data-qtp='canvas'></pre>


<video src='https://pz.igs.farm/resources/assets/flagBenin5.avi'></video>
<embedvideo>https://pz.igs.farm/resources/assets/flagBenin5.avi</embedvideo>
==Benin==
==Benin==
<div class='qu' data-width="150" data-height="100">
<div class='qu' data-width="150" data-height="100">

Revision as of 10:22, 18 August 2021


EmbedVideo is missing a required parameter.

Benin

  • The flag is 150 by 100
  • The green rectangle is 50 by 100
  • The yellow and red rectangles are 100 by 50
Flag of Benin
function drawFlag(ctx)
{
}  
function drawFlag(ctx)
{
  ctx.fillStyle = 'green';
  ctx.fillRect(0,0,50,100);
  ctx.fillStyle = 'yellow';
  ctx.fillRect(50,0,100,50);
  ctx.fillStyle = 'red';
  ctx.fillRect(50,50,100,50);
}