Skip to content

Commit

Permalink
Update generate-flags.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsBaumgartner1994 authored Nov 28, 2024
1 parent 9ca2258 commit e863e00
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions scripts/generate-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@ const generateFlag = (isoCode) => {

// Draw the colored ring
ctx.beginPath();
ctx.arc(128, 128, outerRadius, 0, Math.PI * 2);
ctx.arc(128, 128, innerRadius, Math.PI * 2, 0, true);
ctx.closePath();
ctx.arc(128, 128, outerRadius, 0, Math.PI * 2, false); // Outer arc
ctx.arc(128, 128, innerRadius, Math.PI * 2, 0, true); // Inner arc (reversed)
ctx.fillStyle = color;
ctx.fill();

// Draw only the outer edge of the ring
// Draw black separators for the ring's outer and inner edges
ctx.beginPath();
ctx.arc(128, 128, outerRadius, 0, Math.PI * 2);
ctx.closePath();
ctx.lineWidth = 2; // Line thickness
ctx.lineWidth = 2;
ctx.strokeStyle = 'black';
ctx.stroke();

ctx.beginPath();
ctx.arc(128, 128, innerRadius, 0, Math.PI * 2);
ctx.lineWidth = 2;
ctx.strokeStyle = 'black';
ctx.stroke();
});
Expand Down

0 comments on commit e863e00

Please sign in to comment.