Flags: Worked Examples: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
Video from Panopto: | Video from Panopto: | ||
*[https://napier.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=40d77c01-abda-4333-805a-ad8800e8f121 Benin | *[https://napier.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=40d77c01-abda-4333-805a-ad8800e8f121 Benin Walk-through] | ||
==Benin== | ==Benin== | ||
Latest revision as of 17:32, 4 September 2021
Video from Panopto:
Benin
{{#ev:youtube|JsZafc6Y7xQ}}
- The flag is 150 by 100
- The green rectangle is 50 by 100
- The yellow and red rectangles are 100 by 50

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);
}
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);
}