Package org.scijava.util
Class RealRect
- java.lang.Object
-
- org.scijava.util.RealRect
-
public class RealRect extends Object
A class for representing a rectangular region, in real coordinates.- Author:
- Barry DeZonia, Curtis Rueden
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(RealCoords coords)Tests whether the given coordinates lie within the rectangle.booleanequals(Object o)RealCoordsgetBottomRight()Gets the bottom right coordinate of the rectangle.RealCoordsgetTopLeft()Gets the top left coordinate of the rectangle.inthashCode()RealRectintersection(RealRect r)Returns a Rect representing the intersection of this Rect with the given Rect.booleanintersects(RealRect r)Returns true if this rect intersects the given rect.StringtoString()
-
-
-
Method Detail
-
intersects
public boolean intersects(RealRect r)
Returns true if this rect intersects the given rect.
-
intersection
public RealRect intersection(RealRect r)
Returns a Rect representing the intersection of this Rect with the given Rect. If the two Rects do not intersect, the result is an empty Rect.
-
contains
public boolean contains(RealCoords coords)
Tests whether the given coordinates lie within the rectangle.
-
getTopLeft
public RealCoords getTopLeft()
Gets the top left coordinate of the rectangle.
-
getBottomRight
public RealCoords getBottomRight()
Gets the bottom right coordinate of the rectangle.
-
-