 	 */
 	public function begin(target:Graphics, bounds:Rectangle):void
 	{		
-		if (!source)
+        var sourceAsBitmapData:BitmapData = _bitmapData;
+        
+		if (!sourceAsBitmapData)
 			return;        
+        
+        var repeatFill:Boolean = (resizeMode == BitmapResizeMode.REPEAT); 
         
         // If we need to apply the alpha, we need to make another clone. So dispose of the old one.
         if (nonRepeatAlphaSource && applyAlphaMultiplier)

			{
				bitmapData = new BitmapData(tmpSprite.width, tmpSprite.height, true, 0);
				bitmapData.draw(tmpSprite, new Matrix());
			}
            
            // If the bitmapData isn't transparent (ex. JPEG), then copy it into a transparent bitmapData
            if (!bitmapData.transparent)
            {
                // TODO (jszeto) : Dispose of this bitmap when we no longer need it
                var transparentBitmap:BitmapData = new BitmapData(bitmapData.width, bitmapData.height, true);
                transparentBitmap.draw(bitmapData);
                _source = transparentBitmap;
            }
            else
            {
	
			    _source = bitmapData;
            }
			
            applyAlphaMultiplier = true;
			dispatchFillChangedEvent("source", oldValue, bitmapData);
        }
	}


	private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
	private static var transformMatrix:Matrix = new Matrix();
    private var nonRepeatAlphaSource:BitmapData;
    private var _bitmapData:BitmapData;
    
    private var regenerateNonRepeatSource:Boolean = true;
    private var lastBoundsWidth:Number = 0;
    private var lastBoundsHeight:Number = 0;
    private var applyAlphaMultiplier:Boolean = false;
    private var nonRepeatSourceCreated:Boolean = false;
    private var bitmapDataCreated:Boolean = false;
    
	//--------------------------------------------------------------------------
	//
