在flex中如何给两个同心圆不叠加部分填充颜色?
展开全部
希望对你有帮助
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)">
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
canvass.graphics.lineStyle(1,0xff);
canvass.graphics.beginFill(0x000000); //括号里面表示填充圆环的颜色
canvass.graphics.drawCircle(100,100,20);//表示在坐标为(300,200)的位置画一个半径为20的圆圈
canvass.graphics.drawCircle(100,100,30);//表示在坐标为(300,200)的位置画一个半径为30的圆圈
canvass.graphics.endFill();//表示绘画完毕
}
]]>
</mx:Script>
<mx:Canvas id="canvass" width="100%" height="100%"/>
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)">
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
canvass.graphics.lineStyle(1,0xff);
canvass.graphics.beginFill(0x000000); //括号里面表示填充圆环的颜色
canvass.graphics.drawCircle(100,100,20);//表示在坐标为(300,200)的位置画一个半径为20的圆圈
canvass.graphics.drawCircle(100,100,30);//表示在坐标为(300,200)的位置画一个半径为30的圆圈
canvass.graphics.endFill();//表示绘画完毕
}
]]>
</mx:Script>
<mx:Canvas id="canvass" width="100%" height="100%"/>
</mx:Application>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询