Watermark effect

작성자

카테고리:

I made a watermark effect. I added addWatermark() method to BMPFunctions.as file which I revealed earlier. You can download the class file from the following link.
비트맵데이터에 워터마크를 넣는 효과를 만들어 보았습니다. 전에 공개한 BMPFunctions.as 클래스 에 addWatermark() 메소드를 추가한 것으로, 아래 링크에서 BMPFunctions.as 파일을 다운로드 하세요.
BitmapDataにウオーターマークを増すエフェクトを作ってみました。以前に公開したBMPFunctions.asクラスにaddWatermark()メソッド追加したんです。下のリンクからBMPFunctions.asファイルをダウンロードします。

http://hangunsworld.com/classes/com/hangunsworld/as3/util/

import	com.hangunsworld.as3.util.BMPFunctions;

var wm:BitmapData = new WatermarkSource(0, 0);

var bd:BitmapData = new BitmapData(mc.width, mc.height, true, 0×00);
bd.draw(mc);

var bmp:Bitmap = new Bitmap(bd);
bmp.x = mc.width + 5;
addChild(bmp);

add_btn.addEventListener(MouseEvent.CLICK, btnClick);
function btnClick(evt:MouseEvent):void{
	var mar:uint = uint(margin_txt.text);
	var off:uint = uint(offset_txt.text);
	var sca:Number = uint(scale_txt.text);
	var rot:uint = uint(rotation_txt.text);
	rot = rot%360;
	rotation_txt.text = rot.toString();
	var alp:Number = uint(alpha_txt.text);
	alp = Math.min(alp, 100);
	alpha_txt.text = alp.toString();

	sca /= 100;
	alp /= 100;

	bd.draw(mc);
	bd = BMPFunctions.addWatermark(bd, wm, mar, off, sca, rot, alp);
}

Download FLA

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다