 		if (!source)
 			return;        
         
-        var bd:BitmapData;
         var sourceAsBitmapData:BitmapData = source as BitmapData;
+        
+        var repeatFill:Boolean = (resizeMode == BitmapResizeMode.REPEAT);  
+        
         
         if (compoundTransform)
         {

        {
            transformMatrix.identity();
            transformMatrix.translate(-transformX, -transformY);
            transformMatrix.scale(scaleX, scaleY);
            transformMatrix.rotate(rotation * RADIANS_PER_DEGREES);
            transformMatrix.translate(x + bounds.left + transformX, y + bounds.top + transformY);
        }

        // If repeat is true or if the source bitmap size equals or exceeds the bounds, 
        // just use the source bitmap
        if (repeat || 
            (MatrixUtil.isDeltaIdentity(transformMatrix) && 
             transformMatrix.tx == bounds.left &&
             transformMatrix.ty == bounds.top &&

                lastBoundsHeight = bounds.height;
            }
            
            sourceAsBitmapData = nonRepeatSource;
        }
        
		target.beginBitmapFill(sourceAsBitmapData, transformMatrix, repeatFill, smooth);
	}
	
	/**
