java.awt.geom
public static class Line2D.Float extends Line2D
float
precision.
Since: 1.2
UNKNOWN: updated to 1.4
Field Summary | |
---|---|
float | x1 The x coordinate of the first point. |
float | x2 The x coordinate of the second point. |
float | y1 The y coordinate of the first point. |
float | y2 The y coordinate of the second point. |
Constructor Summary | |
---|---|
Float()
Construct the line segment (0,0)->(0,0). | |
Float(float x1, float y1, float x2, float y2)
Construct the line segment with the specified points.
| |
Float(Point2D p1, Point2D p2)
Construct the line segment with the specified points.
|
Method Summary | |
---|---|
Rectangle2D | getBounds2D()
Return the exact bounds of this line segment.
|
Point2D | getP1()
Return the first point.
|
Point2D | getP2()
Return the second point.
|
double | getX1()
Return the x coordinate of the first point.
|
double | getX2()
Return the x coordinate of the second point.
|
double | getY1()
Return the y coordinate of the first point.
|
double | getY2()
Return the y coordinate of the second point.
|
void | setLine(double x1, double y1, double x2, double y2)
Set this line to the given points.
|
void | setLine(float x1, float y1, float x2, float y2)
Set this line to the given points.
|
Parameters: x1 the x coordinate of the first point y1 the y coordinate of the first point x2 the x coordinate of the second point y2 the y coordinate of the second point
Parameters: p1 the first point p2 the second point
Throws: NullPointerException if either point is null
Returns: the bounding box
Returns: the point (x1,y1)
Returns: the point (x2,y2)
Returns: the value of x1
Returns: the value of x2
Returns: the value of y1
Returns: the value of y2
Parameters: x1 the new x coordinate of the first point y1 the new y coordinate of the first point x2 the new x coordinate of the second point y2 the new y coordinate of the second point
Parameters: x1 the new x coordinate of the first point y1 the new y coordinate of the first point x2 the new x coordinate of the second point y2 the new y coordinate of the second point