Android Robot (upgraded version)

Source: Internet
Author: User

<! DOCTYPE html>

<meta charset= "UTF-8" >
<title></title>


<body>
<canvas id= "Canvas" width= "height=" style= "Background-color:gainsboro" >
You play wild I hang up the machine. No, just send it.
</canvas>

<script type= "Text/javascript" >
Window.onload=function () {
Init ();
}
function init () {
var canvas = document.getElementById ("Canvas");
var cxt = Canvas.getcontext ("2d");

Big

Cxt.fillstyle = "White";
Cxt.beginpath ();
Cxt.arc (0, Math.PI, true);
Cxt.closepath ();
Cxt.fill ();

Hat

Cxt.fillstyle = "Red";
Cxt.beginpath ();
Cxt.arc ( -145*math.pi/180, -35*math.pi/180, false);
Cxt.closepath ();
Cxt.fill ();


Left eye

Cxt.fillstyle = "BLACK";
Cxt.beginpath ();
Cxt.arc (5, 0, math.pi*2, true);
Cxt.closepath ();
Cxt.fill ();
Right eye

Cxt.fillstyle = "BLACK";
Cxt.beginpath ();
Cxt.arc (5, 0, math.pi*2, true);
Cxt.closepath ();
Cxt.fill ();

Body
Cxt.fillstyle = "White";
Cxt.beginpath ();
Cxt.fillrect (100,90,100,120);
Cxt.closepath ();
Cxt.fill ();

Left
Cxt.fillstyle = "White";
Cxt.beginpath ();
Cxt.fillrect (70,100,20,80);
Cxt.closepath ();
Cxt.fill ();

Left hand Sleeve

Cxt.fillstyle = "Red";
Cxt.beginpath ();
Cxt.fillrect (70,100,20,30);
Cxt.closepath ();
Cxt.fill ();

Right
Cxt.fillstyle = "White";
Cxt.beginpath ();
Cxt.fillrect (210,100,20,80);
Cxt.closepath ();
Cxt.fill ();

Right hand sleeve

Cxt.fillstyle = "Red";
Cxt.beginpath ();
Cxt.fillrect (210,100,20,30);
Cxt.closepath ();
Cxt.fill ();

Left foot
Cxt.fillstyle = "White";
Cxt.beginpath ();
Cxt.fillrect (120,215,20,40);
Cxt.closepath ();
Cxt.fill ();

Right foot
Cxt.fillstyle = "White";
Cxt.beginpath ();
Cxt.fillrect (160,215,20,40);
Cxt.closepath ();
Cxt.fill ();

Clothes
Cxt.fillstyle = "Red";
Cxt.beginpath ();
Cxt.fillrect (100,100,100,100);
Cxt.closepath ();
Cxt.fill ();

Briefs
Cxt.fillstyle= "Red";
Cxt.beginpath ();
Cxt.moveto (120,215);
Cxt.lineto (180,215);
Cxt.lineto (150,230);
Cxt.lineto (120,215);
Cxt.closepath ();
Cxt.fill ();


}
</script>
</body>

Android Robot (upgraded version)

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.