示例#1
0
 public static void intersect(Rect r1, Rect r2, Rect dst) {
   dst.top = Math.max(r1.top, r2.top);
   dst.bottom = Math.min(r1.bottom, r2.bottom);
   dst.left = Math.max(r1.left, r2.left);
   dst.right = Math.min(r1.right, r2.right);
 }