var startx = 400;
var starty = 200;
var controlx1 = 290;
var controly1 = 60;
var controlx2 = 90;
var controly2 = 250;
var endx1 = 250;
var endy1 = 340;
var controlx3 = 365;
var controly3 = 390;
var endx2 = 400;
var endy2 = 500;
var controlx4 = 435;
var controly4 = 390;
var endx3 = 500;
var endy3 = 350;
var controlx5 = 720;
var controly5 = 250;
var controlx6 = 510;
var controly6 = 60;
context.beginPath();
context.moveTo(startx, starty);
context.bezierCurveTo(controlx1, controly1, controlx2, controly2, endx1, endy1);
context.quadraticCurveTo(controlx3,controly3, endx2, endy2);
context.quadraticCurveTo(controlx4, controly4, endx3, endy3);
context.bezierCurveTo(controlx5, controly5, controlx6, controly6, startx, starty);
context.fillStyle = 'rgb(255, 70, 120)';
context.fill();
context.stroke();
No comments:
Post a Comment