<body> <!--artboards--//text appears when the browser is not supported<canvas id= "Canvas" style= "background-color:black;" > Your current version does not support </canvas> <script type= "Text/javascript" >//get the artboard . varCanvas = document.getElementById (' Canvas '); Canvas.width= 1000; Canvas.height= 1000; //Get Context varcontext = Canvas.getcontext (' 2d '); //set the color of a lineContext.strokestyle = ' Red '; //set the width of a lineContext.linewidth = 5; //Draw a lineContext.beginpath (); //starting pointContext.moveto (200, 200); //EndContext.lineto (500, 200); Context.closepath (); Context.stroke (); //Draw an arcContext.beginpath (); /** Params * Center x Coordinate * Center y coordinate * radius * start angle * End angle * direction, true counter clockwise false clockwise default false, no write indicates false*/Context.arc (200,200,100,0,math.pi/2,false);Context.closepath (); Context.stroke (); Context.strokestyle= ' Red '; Context.arc (200,200,100,0,MATH.PI/2, True);Context.closepath (); Context.stroke (); </script></body>
JS uses canvas to draw lines, curves