Java Utililty Methods Area Intersect

List of utility methods to do Area Intersect

  1. HOME
  2. Java
  3. A
  4. Area Intersect

Description

The list of methods to do Area Intersect are organized into topic(s).

Method

boolean intersection(Area a1, Area a2)
Check whether the two provided areas intersect one another.
Area copy = new Area(a1);
copy.intersect(a2);
return !copy.isEmpty();
boolean intersects(Area a, Area b)
intersects
Area a2 = (Area) a.clone();
a2.intersect(b);
return !a2.isEmpty();
boolean intersects(Area lhs, Area rhs)
intersects
if (lhs == null || lhs.isEmpty() || rhs == null || rhs.isEmpty()) {
 return false;
if (!lhs.getBounds().intersects(rhs.getBounds())) {
 return false;
Area newArea = new Area(lhs);
newArea.intersect(rhs);
...

AltStyle によって変換されたページ (->オリジナル) /