 import flash.geom.ColorTransform;
 import flash.geom.Matrix;
 import flash.geom.Point;
-import flash.geom.Rectangle;
 import flash.geom.Transform;
 
 import flex.geom.Transform;

        var oldPos:Point = actualPosition;
        
        setActualPosition(0, 0);
        bitmapData.draw(displayObject, displayObject.transform.matrix);
        setActualPosition(oldPos.x, oldPos.y);
    
        return bitmapData;

    }

    //----------------------------------
    //  drawX
    //----------------------------------

    /**
     *  The x-position where the element should be drawn 
     */
    protected function get drawX():Number
    {
    	// Draw position depends upon which coordinate space we are located in.
    	// TODO!!! We need to apply all of the transforms of our ancestors
        return displayObject ? 0 : sharedDisplayObject && sharedDisplayObject != elementHost ? x - sharedDisplayObject.x : x;
    }
    
    //----------------------------------
    //  drawY
    //----------------------------------

    /**
     *  The y-position where the element should be drawn 
     */
    protected function get drawY():Number
    {
    	// Draw position depends upon which coordinate space we are located in.
    	// TODO!!! We need to apply all of the transforms of our ancestors
        return displayObject ? 0 : sharedDisplayObject && sharedDisplayObject != elementHost ? y - sharedDisplayObject.y : y;
    }
    
    //----------------------------------
    //  includeInLayout
    //----------------------------------

