public class Line extends AbstractLine implements Serializable
Modifier and Type | Field and Description |
---|---|
float |
x1
The x-coordinate of the start of this line segment.
|
float |
x2
The x-coordinate of the end of this line segment.
|
float |
y1
The y-coordinate of the start of this line segment.
|
float |
y2
The y-coordinate of the end of this line segment.
|
Constructor and Description |
---|
Line()
Creates a line from (0,0) to (0,0).
|
Line(float x1,
float y1,
float x2,
float y2)
Creates a line from (x1,y1), to (x2,y2).
|
Line(XY p1,
XY p2)
Creates a line from p1 to p2.
|
Modifier and Type | Method and Description |
---|---|
void |
setLine(float x1,
float y1,
float x2,
float y2)
Sets the start and end point of this line to the specified values.
|
void |
setLine(XY p1,
XY p2)
Sets the start and end of this line to the specified points.
|
float |
x1()
Returns the x-coordinate of the start of this line.
|
float |
x2()
Returns the x-coordinate of the end of this line.
|
float |
y1()
Returns the y-coordinate of the start of this line.
|
float |
y2()
Returns the y-coordinate of the end of this line.
|
bounds, bounds, clone, contains, contains, contains, contains, intersects, intersects, isEmpty, p1, p1, p2, p2, pathIterator, pathIterator, pointLineDist, pointLineDist, pointLineDistSq, pointLineDistSq, pointSegDist, pointSegDist, pointSegDistSq, pointSegDistSq, relativeCCW, relativeCCW
public float x1
public float y1
public float x2
public float y2
public Line()
public Line(float x1, float y1, float x2, float y2)
public void setLine(float x1, float y1, float x2, float y2)
public void setLine(XY p1, XY p2)
public float x1()
ILine
public float y1()
ILine
public float x2()
ILine
Copyright © 2017. All rights reserved.