Java java.awt.geom Line2D fields, constructors, methods, implement or subclass

Example usage for Java java.awt.geom Line2D fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt.geom Line2D.

The text is from its open source code.

Method

Objectclone()
Creates a new object of the same class as this object.
RectanglegetBounds()
Rectangle2DgetBounds2D()
Returns a high precision and more accurate bounding box of the Shape than the getBounds method.
Point2DgetP1()
Returns the start Point2D of this Line2D .
Point2DgetP2()
Returns the end Point2D of this Line2D .
doublegetX1()
Returns the X coordinate of the start point in double precision.
doublegetX2()
Returns the X coordinate of the end point in double precision.
doublegetY1()
Returns the Y coordinate of the start point in double precision.
doublegetY2()
Returns the Y coordinate of the end point in double precision.
booleanintersects(Rectangle2D r)
booleanintersectsLine(Line2D l)
Tests if the specified line segment intersects this line segment.
doubleptLineDist(double px, double py)
Returns the distance from a point to this line.
doubleptSegDist(double x1, double y1, double x2, double y2, double px, double py)
Returns the distance from a point to a line segment.
doubleptSegDist(Point2D pt)
Returns the distance from a Point2D to this line segment.
voidsetLine(Point2D p1, Point2D p2)
Sets the location of the end points of this Line2D to the specified Point2D coordinates.
voidsetLine(double x1, double y1, double x2, double y2)
Sets the location of the end points of this Line2D to the specified double coordinates.
StringtoString()
Returns a string representation of the object.