Package org.htmlunit.util.geometry
Class Rectangle2D
java.lang.Object
org.htmlunit.util.geometry.Rectangle2D
- All Implemented Interfaces:
Shape2D
Simple 2D shape rectangle.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
private double
private double
private double
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
left_
private double left_ -
top_
private double top_ -
right_
private double right_ -
bottom_
private double bottom_
-
-
Constructor Details
-
Rectangle2D
public Rectangle2D(double x1, double y1, double x2, double y2) Ctor.- Parameters:
x1
- x value of the first cornery1
- y value of the first cornerx2
- x value of the second cornery2
- y value of the second corner
-
-
Method Details
-
getLeft
public double getLeft()- Returns:
- the x coord of the leftmost corner.
-
getBottom
public double getBottom()- Returns:
- the y coord of the bottom line.
-
contains
public boolean contains(double x, double y) -
extend
public void extend(double x, double y) -
isEmpty
public boolean isEmpty() -
toString
-