The arc() method creates a circular arc with a radius of radius centered at (x,y). The arc will begin and end at startAngle and endAngle, respectively. startAngle and endAngle are both measured in radians.
Time needed: 5 minutes.
- Step 1: Create a folder.
First, create a folder and named it.
- Step 2: Open the folder in “Sublime Text”.
Second ,after creating a folder, open it in “sublime text“.
- Step 3: Create a html file.
Third, create a “html” file and save it as “index.html“
The code given below is for the html module
<title>Draw a circle</title>
<canvas id="circle" width="150" height="150"></canvas>
In the code above given which is the html module of the project.
var canvas = document.getElementById('circle');
var ctx = canvas.getContext('2d');
var X = canvas.width / 2;
var Y = canvas.height / 2;
var R = 45;
ctx.arc(X, Y, R, 0, 2 * Math.PI, false);
ctx.lineWidth = 3;
ctx.strokeStyle = 'skyblue';
|ABOUT PROJECT||PROJECT DETAILS|
|Developer Name :||itsourcecode.com|
|IDE Tool (Recommended):||Sublime|
|Project Type :||Web Application|
|Upload Date:||July 27, 2021|
Run Quick Virus Scan for secure DownloadRun Quick Scan for secure Download
Downloadable Source Code