Example usage for Java java.awt.geom Line2D fields, constructors, methods, implement or subclass
The text is from its open source code.
Object | clone() Creates a new object of the same class as this object. |
Rectangle | getBounds() |
Rectangle2D | getBounds2D() Returns a high precision and more accurate bounding box of the Shape than the getBounds method. |
Point2D | getP1() Returns the start Point2D of this Line2D . |
Point2D | getP2() Returns the end Point2D of this Line2D . |
double | getX1() Returns the X coordinate of the start point in double precision. |
double | getX2() Returns the X coordinate of the end point in double precision. |
double | getY1() Returns the Y coordinate of the start point in double precision. |
double | getY2() Returns the Y coordinate of the end point in double precision. |
boolean | intersects(Rectangle2D r) |
boolean | intersectsLine(Line2D l) Tests if the specified line segment intersects this line segment. |
double | ptLineDist(double px, double py) Returns the distance from a point to this line. |
double | ptSegDist(double x1, double y1, double x2, double y2, double px, double py) Returns the distance from a point to a line segment. |
double | ptSegDist(Point2D pt) Returns the distance from a Point2D to this line segment. |
void | setLine(Point2D p1, Point2D p2) Sets the location of the end points of this Line2D to the specified Point2D coordinates. |
void | setLine(double x1, double y1, double x2, double y2) Sets the location of the end points of this Line2D to the specified double coordinates. |
String | toString() Returns a string representation of the object. |