javascript - How can we take advantage of moveTo( ) HTML5 method? -
Please feel confused to me, so I need your help
My question is that we How can the moveTo () get the benefit of the html5 method?
For example, I found this example on the stack overlay
function drawSmile (CTX, X, Y, FaceRD, IRDDs) {CTX. // save ctx.fillStyle = '# FF6'; // Face Style: Fill Color Yellow CTX. Translestate (X, Y); // Now (x, y) canvas (0,0) is ctx.beginPath (); // path ctx.arc for face (0, 0, face radix, 0, 6.28); Ctx.fill (); Ctx.fillStyle = '# 000'; // Eye Style: Fill color is black ctx.beginPath (); // Path for two eyes ctx.arc (face radix / 2, - face radix / 3, eye radius, 0, 6.28); Ctx.moveTo (- fourth triangle / 2, - face radix / 3); // Second eye CTX Sub path for CR (-FlashRDs / 2, - FaceRDIS / 3, IRDDS, 0, 6.28); Ctx.fill (); Ctx.restore (); // Reference just before entering the drawSmile is fine} Dormile (C, 200,200, 60, 12);
But when I removed the line number 11 in the code which uses the hilft method, nothing is changing !!!!
Comments
Post a Comment