Flags of Russia: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
| Line 4: | Line 4: | ||
[[Image:FlagChita]]  | [[Image:FlagChita]]  | ||
<pre class=usr>  | <pre class=usr>  | ||
function drawFlag(){  | function drawFlag(ctx){  | ||
  ctx.fillStyle = 'yellow';  | |||
  ctx.moveTo(0,0);  | |||
  ctx.lineTo(100,68);  | |||
  ctx.lineTo(0,136);  | |||
  ctx.fill();  | |||
  ctx.beginPath();  | |||
  ctx.fillStyle = 'lime';  | |||
  ctx.moveTo(0,0);  | |||
  ctx.lineTo(100,68);  | |||
  ctx.lineTo(200,68);  | |||
  ctx.lineTo(200,0);  | |||
  ctx.fill();  | |||
  ctx.beginPath();  | |||
  ctx.fillStyle = 'red';  | |||
  ctx.moveTo(0,136);  | |||
  ctx.lineTo(100,68);  | |||
  ctx.lineTo(200,68);  | |||
  ctx.lineTo(200,136);  | |||
  ctx.fill();  | |||
}  | }  | ||
</pre>  | </pre>  | ||
<pre class=ans>  | <pre class=ans>  | ||
function drawFlag(){  | function drawFlag(ctx){  | ||
  ctx.fillStyle = 'yellow';  | |||
  ctx.moveTo(0,0);  | |||
  ctx.lineTo(100,68);  | |||
  ctx.lineTo(0,136);  | |||
  ctx.fill();  | |||
  ctx.beginPath();  | |||
  ctx.fillStyle = 'lime';  | |||
  ctx.moveTo(0,0);  | |||
  ctx.lineTo(100,68);  | |||
  ctx.lineTo(200,68);  | |||
  ctx.lineTo(200,0);  | |||
  ctx.fill();  | |||
  ctx.beginPath();  | |||
  ctx.fillStyle = 'red';  | |||
  ctx.moveTo(0,136);  | |||
  ctx.lineTo(100,68);  | |||
  ctx.lineTo(200,68);  | |||
  ctx.lineTo(200,136);  | |||
  ctx.fill();  | |||
}  | }  | ||
</pre>  | </pre>  | ||
</div>  | </div>  | ||
Revision as of 15:15, 20 August 2021
Chita
function drawFlag(ctx){
  ctx.fillStyle = 'yellow';
  ctx.moveTo(0,0);
  ctx.lineTo(100,68);
  ctx.lineTo(0,136);
  ctx.fill();
  ctx.beginPath();
  ctx.fillStyle = 'lime';
  ctx.moveTo(0,0);
  ctx.lineTo(100,68);
  ctx.lineTo(200,68);
  ctx.lineTo(200,0);
  ctx.fill();
  ctx.beginPath();
  ctx.fillStyle = 'red';
  ctx.moveTo(0,136);
  ctx.lineTo(100,68);
  ctx.lineTo(200,68);
  ctx.lineTo(200,136);
  ctx.fill();
}
function drawFlag(ctx){
  ctx.fillStyle = 'yellow';
  ctx.moveTo(0,0);
  ctx.lineTo(100,68);
  ctx.lineTo(0,136);
  ctx.fill();
  ctx.beginPath();
  ctx.fillStyle = 'lime';
  ctx.moveTo(0,0);
  ctx.lineTo(100,68);
  ctx.lineTo(200,68);
  ctx.lineTo(200,0);
  ctx.fill();
  ctx.beginPath();
  ctx.fillStyle = 'red';
  ctx.moveTo(0,136);
  ctx.lineTo(100,68);
  ctx.lineTo(200,68);
  ctx.lineTo(200,136);
  ctx.fill();
}