|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.geom.Line2D java.awt.geom.Line2D.Double
public static class Line2D.Double
A line in 2D space using float coordinates
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.geom.Line2D |
---|
Line2D.Double, Line2D.Float |
Field Summary | |
---|---|
double |
x1
the x coordinate of the start of the line |
double |
x2
The x coordinate of the end of the line |
double |
y1
The y coordinate of the sztart of the line |
double |
y2
The y coordinate of the start of the line |
Constructor Summary | |
---|---|
Line2D.Double()
Create a zero length line at (0,0) with double coordinates |
|
Line2D.Double(double x1,
double y1,
double x2,
double y2)
Create a line from (x1,y1) to (x2,y2) with double coordinate |
Method Summary | |
---|---|
Rectangle2D |
getBounds2D()
Get the bounds of the line as a Rectangle2D |
Point2D |
getP1()
Get the start point of the line as a Point2D |
Point2D |
getP2()
Get the end point of the line as a Point2D |
double |
getX1()
Get the x coordinate of the start of the line |
double |
getX2()
Get the x coordinate of the end of the line |
double |
getY1()
Get the y coordinate of the start of the line |
double |
getY2()
Get the y coordinate of the end of the line |
void |
setLine(double x1,
double y1,
double x2,
double y2)
Sets the end points of the line using double coordinates. |
Methods inherited from class java.awt.geom.Line2D |
---|
clone, contains, contains, contains, contains, getBounds, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, relativeCCW, relativeCCW, relativeCCW, setLine, setLine |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double x1
public double y1
public double x2
public double y2
Constructor Detail |
---|
public Line2D.Double()
public Line2D.Double(double x1, double y1, double x2, double y2)
x1
- the x coordinate of the start of the liney1
- the y coordinate of the start of the linex2
- the x coordinate of the end of the liney2
- the y coordinate of the end of the lineMethod Detail |
---|
public double getX1()
Line2D
getX1
in class Line2D
public double getY1()
Line2D
getY1
in class Line2D
public Point2D getP1()
Line2D
getP1
in class Line2D
public double getX2()
Line2D
getX2
in class Line2D
public double getY2()
Line2D
getY2
in class Line2D
public Point2D getP2()
Line2D
getP2
in class Line2D
public void setLine(double x1, double y1, double x2, double y2)
Line2D
setLine
in class Line2D
x1
- the x coordinate of the start pointy1
- the y coordinate of the start pointx2
- the x coordinate of the end pointy2
- the y coordinate of the end pointpublic Rectangle2D getBounds2D()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |