Package adams.gui.visualization.image
Class RectangleUtils
- java.lang.Object
-
- adams.gui.visualization.image.RectangleUtils
-
public class RectangleUtils extends Object
Helper class for selections.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RectangleUtils.RectangleCorner
Defines the corners of a rectangle.
-
Constructor Summary
Constructors Constructor Description RectangleUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Point
rectangleCorner(Point corner1, Point corner2, RectangleUtils.RectangleCorner corner)
Computes the specified corner of the rectangle using two arbitrary corner points of the rectangle.static Rectangle
updateCorner(Rectangle rect, Point cornerOld, Point cornerNew)
Updates the corner of a rectangle and returns the new rectangle.
-
-
-
Method Detail
-
rectangleCorner
public static Point rectangleCorner(Point corner1, Point corner2, RectangleUtils.RectangleCorner corner)
Computes the specified corner of the rectangle using two arbitrary corner points of the rectangle.- Parameters:
corner1
- the first cornercorner2
- the second cornercorner
- the type of corner to compute- Returns:
- the computed corner
-
-