static int area(Rect r) { ret rectArea(r); } static double area(DoubleRect r) { ret r == null ? 0 : r.w*r.h; } ifclass WidthAndHeight static int area(WidthAndHeight img) { ret img == null ? 0 : img.getWidth()*img.getHeight(); } endif static int area(BufferedImage img) { ret img == null ? 0 : img.getWidth()*img.getHeight(); }