AS3图像地图,圆,斜面过滤器
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AS3图像地图,圆,斜面过滤器相关的知识,希望对你有一定的参考价值。
var imageLoader:Loader = new Loader(); var imageURL:String = "pixels.png"; var imageRequest:URLRequest = new URLRequest(imageURL); imageLoader.load(imageRequest); imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded); function imageLoaded(event:Event):void{ var bitmap:BitmapData = new BitmapData(imageLoader.width, imageLoader.height, true, 0); bitmap.draw(imageLoader, new Matrix()); var matrix:Matrix = new Matrix(); matrix.scale(5,5); var circleDrawing:Sprite = new Sprite(); circleDrawing.graphics.lineStyle(); circleDrawing.graphics.beginBitmapFill(bitmap, matrix); //circleDrawing.graphics.drawCircle(100, 100, 100); circleDrawing.graphics.drawEllipse(200, 300, 100, 200); addChild(circleDrawing); //circleDrawing.x = 300; var bevel:BevelFilter = new BevelFilter(); bevel.blurX = 20; bevel.blurY = 20; bevel.quality = 1; bevel.angle = 30; bevel.distance = 30; bevel.shadowAlpha = 1; bevel.highlightAlpha = 1; bevel.shadowColor = 0xFF0000; bevel.highlightColor = 0xFFFFFF; bevel.strength = 1; //normal range 0 to 1, could go higher var filtersArray:Array = new Array(bevel); circleDrawing.filters = filtersArray; }
以上是关于AS3图像地图,圆,斜面过滤器的主要内容,如果未能解决你的问题,请参考以下文章