Oct 222007
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/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 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); } |
Recent Comments