1<! DOCTYPE html>2"http://www.w3.org/1999/xhtml">34<meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/>5<title></title>6<script type="Text/javascript">7Window.onload =function () {8 varCanvas = document.getElementById ("Canvas");9 varContext = Canvas.getcontext ("2d");TenCanvas.width =" -"; oneCanvas.height =" -"; a varPoints = [ -{p: [{x:0Y:0}, {x: -Y:0}, {x: $Y: $}], color:"Red" }, -{p: [{x:0Y:0}, {x: $Y: $}, {x:0Y: -}], color:"Orange" }, the{p: [{x: -Y:0}, {x: -Y: $}, {x: -Y: -}, {x: -Y: -}], color:"Yellow" }, -{p: [{x: -Y: -}, {x: -Y: -}, {x: $Y: $}], color:"Green" }, -{p: [{x: $Y: $}, {x: -Y: -}, {x: $Y: -}, {x: -Y: -}], color:"Cyan" }, -{p: [{x: -Y: -}, {x: $Y: -}, {x:0Y: -}], color:"Blue" }, +{p: [{x: -Y: $}, {x: -Y: -}, {x: $Y: -}], color:"Purple" } - ] + for(vari =0; I < points.length; i++) { a Context.beginpath (); at //Context.moveto (points[i].p[0].x, points[i].p[0].y); - for(varj =0; J < points[i].p.length; J + +) { - Context.lineto (points[i].p[j].x, points[i].p[j].y); -Context.fillstyle =points[i].color; - } - Context.closepath (); inContext.linewidth ="3"; -Context.strokestyle ="Black"; to Context.stroke (); + Context.fill (); - } the } *</script> $Panax Notoginseng<body> -<canvas id="Canvas"style="border:5px solid red; margin:50px,auto;"></canvas> the</body> +HTML5 Tangram Canvas Drawing (review)