ActionScript 3 AS3图像映射,圆形,斜角滤波器
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 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;
}
以上是关于ActionScript 3 AS3图像映射,圆形,斜角滤波器的主要内容,如果未能解决你的问题,请参考以下文章
ActionScript 3 AS3圆形半径定位动画
ActionScript 3 带有圆形预加载器微调器的AS3 Image Loader
ActionScript 3 AS3:图像加载
ActionScript 3 as3全背景图像类
ActionScript 3 AS3获取图像的平均颜色
ActionScript 3 AS3:在图像上放置叠加层