         var fillScaleY:Number = 1;
         var roundedDrawX:Number = Math.round(drawX);
         var roundedDrawY:Number = Math.round(drawY);
-        var fillWidth:Number = unscaledWidth;
-        var fillHeight:Number = unscaledHeight;
-    
+        var fillWidth:Number = adjustedWidth;
+        var fillHeight:Number = adjustedHeight;
+        
         switch(_fillMode)
         {
             case BitmapFillMode.REPEAT: 

                var destScaleGridRight:Number = unscaledWidth - (_bitmapData.width - _scaleGridRight);      
                cachedDestGrid = [];
                cachedDestGrid.push([new Point(0, 0), new Point(_scaleGridLeft, 0), 
                                new Point(destScaleGridRight, 0), new Point(unscaledWidth, 0)]);
                cachedDestGrid.push([new Point(0, _scaleGridTop), new Point(_scaleGridLeft, _scaleGridTop), 
                                new Point(destScaleGridRight, _scaleGridTop), new Point(unscaledWidth, _scaleGridTop)]);
                cachedDestGrid.push([new Point(0, destScaleGridBottom), new Point(_scaleGridLeft, destScaleGridBottom), 
                                new Point(destScaleGridRight, destScaleGridBottom), new Point(unscaledWidth, destScaleGridBottom)]);
                cachedDestGrid.push([new Point(0, unscaledHeight), new Point(_scaleGridLeft, unscaledHeight), 
                               new Point(destScaleGridRight, unscaledHeight), new Point(unscaledWidth, unscaledHeight)]);                     
            }                                                   

            var sourceSection:Rectangle = new Rectangle();
            var destSection:Rectangle = new Rectangle();
            

    //--------------------------------------------------------------------------
    
    private var _bitmapData:BitmapData;
    private var _scaleGridBottom:Number;
    private var _scaleGridLeft:Number;
    private var _scaleGridRight:Number;
    private var _scaleGridTop:Number;
    private var bitmapDataCreated:Boolean;
    private static var matrix:Matrix = new Matrix();  
    private var cachedSourceGrid:Array;
    private var cachedDestGrid:Array;
    private var imageWidth:int;
    private var imageHeight:int;
    private var loadedContent:DisplayObject;
    private var previousUnscaledWidth:Number;
    private var previousUnscaledHeight:Number;
    private var sourceInvalid:Boolean;
    

    //----------------------------------
    //  bytesLoaded
    //----------------------------------
    
    private var _bytesLoaded:Number = NaN;
    
    /**
     *  The number of bytes of the image already loaded.
     *  Only relevant for images loaded by request URL. 
     * 
     *  @default NaN
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.0
     *  @productversion Flex 4.5
     */
    public function get bytesLoaded():Number 
    {
        return _bytesLoaded; 
    }
    
    //----------------------------------
    //  bytesTotal
    //----------------------------------
    
    private var _bytesTotal:Number = NaN;
    
    /**
     *  The total image data in bytes loaded or pending load. 
     *  Only relevant for images loaded by request URL. 
     * 
     *  @default NaN
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 2.0
     *  @productversion Flex 4.5
     */
    public function get bytesTotal():Number 
    {
        return _bytesTotal; 
    }

	//----------------------------------
	//  contentGrouping
	//----------------------------------
	
	private var _contentGrouping:String;
	
	/**
	 *  Optional content grouping identifier to pass to the an
	 *  associated IContentLoader instance's load() method.  
	 *  This property is only considered when a valid contentLoader
	 *  is assigned.
	 * 
	 *  @langversion 3.0
	 *  @playerversion Flash 10
	 *  @playerversion AIR 1.5
	 *  @productversion Flex 4.5
	 */
	public function get contentGrouping():String 
	{
		return _contentGrouping; 
	}
	
	/**
	 *  @private
	 */
	public function set contentGrouping(value:String):void
	{
		if (value != _contentGrouping)
		{
			_contentGrouping = value;
			invalidateProperties();
		}
	}
	
	//----------------------------------
	//  contentLoader
	//----------------------------------
	
	private var _contentLoader:IContentLoader;
	private var contentLoaderInvalid:Boolean;
	
	/**
	 *  Optional custom image loader (e.g. image cache or queue) to
	 *  associate with content loader client.
	 * 
	 *  @default null
	 * 
	 *  @langversion 3.0
	 *  @playerversion Flash 10
	 *  @playerversion AIR 1.5
	 *  @productversion Flex 4.5
	 */
	public function get contentLoader():IContentLoader 
	{
		return _contentLoader; 
	}
	
	/**
	 *  @private
	 */
	public function set contentLoader(value:IContentLoader):void
	{
		if (value != _contentLoader)
		{
			_contentLoader = value;
			contentLoaderInvalid = true;
			invalidateProperties();
		}
	}
	
    //----------------------------------
    //  fillMode
    //----------------------------------
    
    /**
     *  @private
     */
