                                                          maxX:Number, 
                                                          maxY:Number):Point
     {
-        // Make sure preferredX, preferredY are between minX and maxX
-        preferredX = Math.max(minX, Math.min(maxX, preferredX));
-        preferredY = Math.max(minY, Math.min(maxY, preferredY));
-        
         // Untransformed bounds size is (x,y). The corners of the untransformed
         // bounding box are p1(0,0) p2(x,0) p3(0,y) p4(x,y).
         // Matrix is | a c tx |

            }
        }
        
        if (a != 0)
        {
            const invA:Number = 1 / a;
            y = preferredY;

            // Case3:

            return null; // No solution
        
        // Handle special cases first
        if (b == 0 && d == 0)
            return null; // No solution
        
        if (b == 0)
            return new Point( preferredX, h / Math.abs(d) );               
        else if (d == 0)
