Esempio n. 1
0
 public Rectangle2D createUnion(Rectangle2D r) {
   if (r instanceof Rectangle) {
     return union((Rectangle) r);
   }
   Rectangle2D dest = new Rectangle2D.Double();
   Rectangle2D.union(this, r, dest);
   return dest;
 }
Esempio n. 2
0
 public Rectangle2D createIntersection(Rectangle2D r) {
   if (r instanceof Rectangle) {
     return intersection((Rectangle) r);
   }
   Rectangle2D dest = new Rectangle2D.Double();
   Rectangle2D.intersect(this, r, dest);
   return dest;
 }