                 b * x + d1 * y < 0) // Satisfy Case4
             {
                 // If there is no solution, or the new solution yields smaller value, pick the new solution.
-                if (!s || transformSize(s, matrix).x > transformSize(new Point(x,y), matrix).x)
+                if (!s || transformSize(s.x, s.y, matrix).x > transformSize(x, y, matrix).x)
                    s = new Point(x, y);
             }
         }

                a * x + c1 * y < 0 ) // Satisfy Case2
            {
                // If there is no solution, or the new solution yields smaller value, pick the new solution.
                if (!s || transformSize(s, matrix).y > transformSize(new Point(x,y), matrix).y)
                   s = new Point(x, y);
            }
        }

	 *  <code>x + vec.x</code> and <code>y + vec.y</code> respectively
	 *  will offset the transformed bounds top left corner by x,y.
	 *
	 *  @return Returns the transformed bounds. Note that the Point object returned will be reused
     *  by other MatrixUtil methods.
	 *  
	 *  @langversion 3.0
	 *  @playerversion Flash 9
	 *  @playerversion AIR 1.1
	 *  @productversion Flex 3
	 */
	public static function transformSize(width:Number, height:Number, matrix:Matrix):Point
	{
        const a:Number = matrix.a;
        const b:Number = matrix.b;
        const c:Number = matrix.c;
        const d:Number = matrix.d;
        
        // transform point (0,0)
        var x1:Number = 0;
        var y1:Number = 0;
        
        // transform point (width, 0)
        var x2:Number = width * a;
        var y2:Number = width * b;
        
        // transform point (0, height)
        var x3:Number = height * c;
        var y3:Number = height * d;

        // transform point (width, height)
        var x4:Number = x2 + x3;
        var y4:Number = y2 + y3;
        
        var minX:Number = Math.min(Math.min(x1, x2), Math.min(x3, x4));
        var maxX:Number = Math.max(Math.max(x1, x2), Math.max(x3, x4));
        var minY:Number = Math.min(Math.min(y1, y2), Math.min(y3, y4));
        var maxY:Number = Math.max(Math.max(y1, y2), Math.max(y3, y4));
        
        staticPoint.x = maxX - minX;
        staticPoint.y = maxY - minY;
        return staticPoint;
	}

	/**
	 *  @param width The width of the bounds to be transformed.
	 *  @param height The height of the bounds to be transformed.
	 *  @param matrix The transfomration matrix.
	 *  
	 *  @param topleft If topLeft is non-null it will be used as the origin of the bounds
	 *  rectangle to be transformed.  On return, it will be set to the top left of the rectangle
	 *  after transformation.
	 *
	 *  @return Returns the transformed width and height. Note that the Point object returned will be reused
     *  by other MatrixUtil methods.
	 *  
	 *  @langversion 3.0
	 *  @playerversion Flash 9
	 *  @playerversion AIR 1.1
	 *  @productversion Flex 3
	 */
	public static function transformBounds(width:Number, height:Number, matrix:Matrix, topLeft:Point = null):Point
	{
        const a:Number = matrix.a;
        const b:Number = matrix.b;
        const c:Number = matrix.c;
        const d:Number = matrix.d;
        
        // transform point (0,0)
        var x1:Number = 0;
        var y1:Number = 0;

        // transform point (width, 0)
        var x2:Number = width * a;
        var y2:Number = width * b;
        
        // transform point (0, height)
        var x3:Number = height * c;
        var y3:Number = height * d;
        
        // transform point (width, height)
        var x4:Number = x2 + x3;
        var y4:Number = y2 + y3;
        
        var minX:Number = Math.min(Math.min(x1, x2), Math.min(x3, x4));
        var maxX:Number = Math.max(Math.max(x1, x2), Math.max(x3, x4));
        var minY:Number = Math.min(Math.min(y1, y2), Math.min(y3, y4));
        var maxY:Number = Math.max(Math.max(y1, y2), Math.max(y3, y4));

        staticPoint.x = maxX - minX;
        staticPoint.y = maxY - minY;

        if (topLeft)
        {
            const tx:Number = matrix.tx;
            const ty:Number = matrix.ty;
            const x:Number = topLeft.x;
            const y:Number = topLeft.y;

	        topLeft.x = minX + a * x + b * y + tx;
	        topLeft.y = minY + c * x + d * y + ty;
		}
        return staticPoint;
	}
	
	/**
