AS3绘制API线条绘制和DropShadow
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AS3绘制API线条绘制和DropShadow相关的知识,希望对你有一定的参考价值。
Just some code that shows you how to set up the Drawing API and draw a line and also use the dropshadow filter.
var lineDrawing:MovieClip = new MovieClip(); this.addChild(lineDrawing); lineDrawing.graphics.lineStyle(1); lineDrawing.graphics.moveTo(0,0); ///This is where we start drawing lineDrawing.graphics.lineTo(350, 600); lineDrawing.graphics.lineTo(600, 400); var dropShadow:DropShadowFilter = new DropShadowFilter(); dropShadow.color = 0x000000; dropShadow.blurX = 10; dropShadow.blurY = 10; dropShadow.angle = 0; dropShadow.alpha = 0.5; dropShadow.distance = 10; var filtersArray:Array = new Array(dropShadow); lineDrawing.filters = filtersArray;
以上是关于AS3绘制API线条绘制和DropShadow的主要内容,如果未能解决你的问题,请参考以下文章