Learn canvas drawing and animation basics making arcs and circles (v)

Source: Internet
Author: User

1 <!DOCTYPE HTML>2 <HTML>3 <HeadLang= "en">4    <MetaCharSet= "UTF-8">5    <title>Making arcs and circles</title>6 </Head>7 <Body>8    <CanvasID= "Canvas"style= "border:1px solid #aaa; display:block;margin:50px auto;">9 the current browser does not support canvas, please change your browserTen    </Canvas> One    <Script> A window.onload=function(){ -         varCanvas=document.getElementById ("Canvas"); -          the Canvas.width=1024x768; - Canvas.height=768; -          -         varContext=Canvas.getcontext ("2d"); +          - Context.linewidth=5; + Context.strokestyle="#005588"; A Context.arc ( -, -, $,0,1.5*Math.PI); at Context.stroke (); -      } -    </Script> -    <!-- - Description: - 1.context.arc (Centerx,centery,radius,startingangle,endingangle,anticlockwise=false);//(Center x coordinate, center y coordinate, radius, Start Radian value, end Radian value, arc draw direction) The arc draws direction by default to false for clockwise drawing direction.  in     -     - to  + </Body> - </HTML>

The drawing effect is as follows:

Learn canvas drawing and animation basics making arcs and circles (v)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.