java.lang.Object | ||
↳ | java.awt.geom.Line2D | |
↳ | java.awt.geom.Line2D.Double |
A line segment specified with double coordinates.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
x1 | The X coordinate of the start point of the line segment. | ||||||||||
x2 | The X coordinate of the end point of the line segment. | ||||||||||
y1 | The Y coordinate of the start point of the line segment. | ||||||||||
y2 | The Y coordinate of the end point of the line segment. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
| |||||||||||
Constructs and initializes a
Line2D from the
specified coordinates. | |||||||||||
Constructs and initializes a
Line2D from the
specified Point2D objects. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the start
Point2D of this Line2D . | |||||||||||
Returns the end
Point2D of this Line2D . | |||||||||||
Returns the X coordinate of the start point in double precision.
| |||||||||||
Returns the X coordinate of the end point in double precision.
| |||||||||||
Returns the Y coordinate of the start point in double precision.
| |||||||||||
Returns the Y coordinate of the end point in double precision.
| |||||||||||
Sets the location of the end points of this
Line2D to
the specified double coordinates. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.awt.geom.Line2D
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.awt.Shape
|
The X coordinate of the start point of the line segment.
The X coordinate of the end point of the line segment.
The Y coordinate of the start point of the line segment.
The Y coordinate of the end point of the line segment.
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
Constructs and initializes a Line2D
from the
specified coordinates.
x1 | the X coordinate of the start point |
---|---|
y1 | the Y coordinate of the start point |
x2 | the X coordinate of the end point |
y2 | the Y coordinate of the end point |
Constructs and initializes a Line2D
from the
specified Point2D
objects.
p1 | the start Point2D of this line segment |
---|---|
p2 | the end Point2D of this line segment |
Returns the start Point2D
of this Line2D
.
Point2D
of this Line2D
.Returns the end Point2D
of this Line2D
.
Point2D
of this Line2D
.Returns the X coordinate of the start point in double precision.
Line2D
object.Returns the X coordinate of the end point in double precision.
Line2D
object.Returns the Y coordinate of the start point in double precision.
Line2D
object.Returns the Y coordinate of the end point in double precision.
Line2D
object.Sets the location of the end points of this Line2D
to
the specified double coordinates.
x1 | the X coordinate of the start point |
---|---|
y1 | the Y coordinate of the start point |
x2 | the X coordinate of the end point |
y2 | the Y coordinate of the end point |