public static void union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dst)
 {
     double x1 = java.lang.Math.min(src1.getMinX(), src2.getMinX());
     double y1 = java.lang.Math.min(src1.getMinY(), src2.getMinY());
     double x2 = java.lang.Math.max(src1.getMaxX(), src2.getMaxX());
     double y2 = java.lang.Math.max(src1.getMaxY(), src2.getMaxY());
     dst.setFrame(x1, y1, x2 - x1, y2 - y1);
 }
Пример #2
0
        public static void union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dst)
        {
            double x1 = java.lang.Math.min(src1.getMinX(), src2.getMinX());
            double y1 = java.lang.Math.min(src1.getMinY(), src2.getMinY());
            double x2 = java.lang.Math.max(src1.getMaxX(), src2.getMaxX());
            double y2 = java.lang.Math.max(src1.getMaxY(), src2.getMaxY());

            dst.setFrame(x1, y1, x2 - x1, y2 - y1);
        }