AS3曲线绘制API和Glow

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AS3曲线绘制API和Glow相关的知识,希望对你有一定的参考价值。

  1. var lineDrawing:MovieClip = new MovieClip();
  2. this.addChild(lineDrawing);
  3.  
  4. lineDrawing.graphics.lineStyle(1, 0x000000, 1 );
  5. lineDrawing.graphics.beginFill( 0x990000, 1 );
  6. lineDrawing.graphics.moveTo(100,100);
  7. lineDrawing.graphics.lineTo(100,200);
  8. lineDrawing.graphics.lineTo(300,200);
  9. lineDrawing.graphics.lineTo(300,100);
  10. lineDrawing.graphics.curveTo(200,0, 100,100); //the first two numbers are your control point for the curve
  11.  
  12.  
  13. ///Glow Filter
  14. var glow:GlowFilter = new GlowFilter();
  15. glow.color = 0x009900;
  16. glow.alpha = 1;
  17. glow.blurX = 25;
  18. glow.blurY = 25;
  19.  
  20. var dropShadow:DropShadowFilter = new DropShadowFilter();
  21. dropShadow.color = 0x000000;
  22. dropShadow.blurX = 10;
  23. dropShadow.blurY = 10;
  24. dropShadow.angle = 0;
  25. dropShadow.alpha = 0.5;
  26. dropShadow.distance = 25;
  27.  
  28. var filtersArray:Array = new Array(glow, dropShadow);
  29. lineDrawing.filters = filtersArray;

以上是关于AS3曲线绘制API和Glow的主要内容,如果未能解决你的问题,请参考以下文章

AS3如何根据用户使用鼠标绘制线条的位置查找贝塞尔曲线的控制点

声音分贝测量、曲线绘制

Highcharts绘制曲线图小结

机器学习逻辑回归分类评估方法

视觉高级篇26 # 如何绘制带宽度的曲线?

视觉高级篇26 # 如何绘制带宽度的曲线?