使用动作脚本如何绘制一个有2个或3个以上颜色的圆圈,如果圆圈被划分为3个部分,那么我将绘制具有3个不同颜色的圆圈。意味着3个弧形成完整的圆圈
答案 0 :(得分:0)
来自pixelwit的教程 这显示了如何绘制弧
答案 1 :(得分:0)
绘制颜色区域,然后对其应用圆形遮罩:
//draw two colored stripes
var shape:Shape = new Shape();
var g:Graphics = shape.graphics;
g.beginFill(0xFF0000);
g.drawRect(0, 0, 100, 50);
g.endFill();
g.beginFill(0xFFFF00);
g.drawRect(0, 50, 100, 50);
g.endFill();
//create circle mask
var mask:Shape = new Shape();
g = mask.graphics;
g.beginFill(0xFFFFFF);
g.drawCircle(50, 50, 50);
g.endFill();
//now shape is two-colored circle
shape.mask = mask;