一、画直线

graphics.clear();                    //删除绘制
graphics.lineStyle(101);     //参数1:线条宽度;参数2:线条颜色;参数3:线条透明度(0.0---1.0)
graphics.moveTo(100100);   //x,y.为线条设置一个新的起始坐标点
graphics.lineTo(100200);    //x,y,如果不移动起始点,将从0,0坐标开始绘制

 

二、画圆

graphics.beginFill(color);                        //color:填充颜色|透明度
graphics.drawCircle(100,100,radius);      //radius:半径
graphics.endFill();                                  //结束绘制

 

三、画四边行

graphics.beginFill(color);                         //填充颜色
graphics.drawRect(100,100,100,100);      //top,left,width,height
graphics.endFill();

 

相关文章:

  • 2022-12-23
  • 2021-11-05
  • 2022-01-21
  • 2022-01-09
  • 2021-06-27
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
猜你喜欢
  • 2022-02-26
  • 2021-12-04
  • 2022-12-23
  • 2021-09-17
  • 2021-08-28
  • 2021-08-01
  • 2022-12-23
相关资源
相似解决方案