context.font="12px SimSun"
var cratioX = 66 / ccircle.radius; //横轴缩放比率
var cratioY = 57 / ccircle.radius; //纵轴缩放比率
//进行缩放(均匀压缩)
context.scale(cratioX, cratioY);
var cindex=0;
for(var cindex=0;cindex<company.length;cindex++){
context.save()
context.beginPath()
//绘制点
context.translate(ccircle.x+Math.cos((Math.PI/180)*cstartAngle)*cradius-6,ccircle.y-Math.sin((Math.PI/180)*cstartAngle)*cradius+14)
context.rotate((Math.PI/2)-(Math.PI/180)*cstartAngle) //Math.PI/2为旋转90度 Math.PI/180*X为旋转多少度
context.fillText(company.charAt(cindex),0,0)
context.strokeText(company.charAt(cindex),0,0)
cstartAngle-=cangleDecrement
context.restore()
}
}
function BezierEllipse4(ctx, x, y, a, b){
var k = .5522848,
ox = a * k, // 水平控制点偏移量
oy = b * k; // 垂直控制点偏移量</p> <p>
ctx.beginPath();
//从椭圆的左端点开始顺时针绘制四条三次贝塞尔曲线
ctx.moveTo(x - a, y);
ctx.bezierCurveTo(x - a, y - oy, x - ox, y - b, x, y - b);
ctx.bezierCurveTo(x + ox, y - b, x + a, y - oy, x + a, y);
ctx.bezierCurveTo(x + a, y + oy, x + ox, y + b, x, y + b);
ctx.bezierCurveTo(x - ox, y + b, x - a, y + oy, x - a, y);
ctx.closePath();
ctx.stroke();
};
</script>
</body>
</html>









