function drawStar(cobj,x, y, radius1, radius2, num, drawType, color) {//参数:画笔,圆心X.圆心Y,半径1,半径2,形状边,实心|空心,颜色 var angle = 360 / (num * 2); var arr = []; for(var i = 0; i < num * 2; i++) { var starObj = {}; if(i % 2 == 0) { starObj.x = x + radius1 * Math…