Package org.htmlunit.util.geometry
Class Polygon2D
java.lang.Object
org.htmlunit.util.geometry.Polygon2D
- All Implemented Interfaces:
Shape2D
Simple 2D shape polygon.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
points_
-
boundingBox_
-
-
Constructor Details
-
Polygon2D
public Polygon2D(double startX, double startY) Ctor.- Parameters:
startX
- the x value of the first point.startY
- the Y value of the first point.- See Also:
-
-
Method Details
-
lineTo
Add another corner Point to the polygon.- Parameters:
x
- the x value of the corner to be addedy
- the y value of the corner to be added- Returns:
- this to support fluent style construction
-
contains
public boolean contains(double x, double y) -
isEmpty
public boolean isEmpty() -
toString
-