Return to Snippet

Revision: 43153
at March 18, 2011 00:41 by JaaQ


Initial Code
function snapClip( clip:DisplayObject ):BitmapData
{
var bounds:Rectangle = clip.getBounds( clip );
var bitmap:BitmapData = new BitmapData( int( bounds.width + 0.5 ), int( bounds.height + 0.5 ), true, 0 );
bitmap.draw( clip, new Matrix(1,0,0,1,-bounds.x,-bounds.y) );
return bitmap;
}

Initial URL

                                

Initial Description

                                

Initial Title
Bitmap Snapshots of DisplayObjects

Initial Tags

                                

Initial Language
ActionScript 3