Coding project





html

<!DOCTYPE HTML>
<html>
<head>
<script>
window.onload = function() {
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");

////////////////////////////////////// start below this line ˇˇˇˇˇˇˇˇˇˇ


//background
context.beginPath();
context.rect(100, 100, 600, 350);
context.fillStyle = '#ED008C';
context.fill();

//white circle
context.beginPath();
context.arc(400, 250, 100, 0, 2*Math.PI, true);  //context.arc(centerx, centery, radius, starting angle, ending angle, counter clockwise?);
context.strokeStyle = '#FFFFFF'
context.fillStyle = '#FFFFFF'
context.stroke();
context.fill();

//black line F
context.beginPath();
context.moveTo(350,220);
context.lineTo(380,220);
context.lineWidth = 4
context.strokeStyle = '#000000';
context.lineCap = "round";
context.stroke();


//black line F
context.beginPath();
context.moveTo(350,220);
context.lineTo(350,280);
context.lineWidth = 4
context.strokeStyle = '#000000';
context.lineCap = "round";
context.stroke();

//black line F
context.beginPath();
context.moveTo(350,250);
context.lineTo(380,250);
context.lineWidth = 4
context.strokeStyle = '#000000';
context.lineCap = "round";
context.stroke();


// black line K
context.beginPath();
context.moveTo(420,220);
context.lineTo(420,280);
context.lineWidth = 4
context.strokeStyle = '#000000';
context.lineCap = "round";
context.stroke();

// black line K
context.beginPath();
context.moveTo(420,250);
context.lineTo(450,220);
context.lineWidth = 4
context.strokeStyle = '#000000';
context.lineCap = "round";
context.stroke();

// black line K
context.beginPath();
context.moveTo(420,250);
context.lineTo(450,280);
context.lineWidth = 4
context.strokeStyle = '#000000';
context.lineCap = "round";
context.stroke();

//white line to fix K
context.beginPath();
context.moveTo(415,220);
context.lineTo(415,300);
context.lineWidth = 5.5
context.strokeStyle = '#FFFFFF';
context.lineCap = "round";
context.stroke();



////////////////////////////////////// end above this line ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ

};

</script>
</head>
<body>
<canvas id="myCanvas" width="800" height="600"></canvas>
</body>
</html>




 

Comments

Popular posts from this blog