java.awt.geom
Class Line2D.Double
java.lang.Object
|
+--java.awt.geom.Line2D
|
+--java.awt.geom.Line2D.Double
public static class
Line2D.Doubleextends
Line2D This class defines a point in double precision.
Since:Author:- Eric Blake <ebb9@email.byu.edu>
x1
public double x1The x coordinate of the first point.
x2
public double x2The x coordinate of the second point.
y1
public double y1The y coordinate of the first point.
y2
public double y2The y coordinate of the second point.
Double
public Double() Construct the line segment (0,0)->(0,0).
Double
public Double(double x1, double y1, double x2, double y2) Construct the line segment with the specified points.
Parameters:
Double
public Double(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2) Construct the line segment with the specified points.
Parameters:
Throws:
getBounds2D
public Rectangle2D getBounds2D() Return the exact bounds of this line segment.
Returns:
getP1
public Point2D getP1() Return the first point.
Returns:
getP2
public Point2D getP2() Return the second point.
Returns:
getX1
public double getX1() Return the x coordinate of the first point.
Returns:
getX2
public double getX2() Return the x coordinate of the second point.
Returns:
getY1
public double getY1() Return the y coordinate of the first point.
Returns:
getY2
public double getY2() Return the y coordinate of the second point.
Returns:
setLine
public void setLine(double x1, double y1, double x2, double y2) Set this line to the given points.
Parameters:
doubleprecision.