|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.v3x.geometry.single.Line
public class Line
A float-precision line class.
| Field Summary | |
|---|---|
float |
x1
|
float |
x2
|
float |
y1
|
float |
y2
|
| Constructor Summary | |
|---|---|
Line()
|
|
Line(float x1,
float y1,
float x2,
float y2)
|
|
| Method Summary | |
|---|---|
boolean |
clipToRectangle(Rectangle rectangle)
Clip this line to rectangle. |
boolean |
equals(Line nother)
|
boolean |
equals(java.lang.Object nother)
|
float |
getLength()
|
float |
getSlope()
|
float |
getX1()
|
float |
getX2()
|
float |
getY1()
|
float |
getY2()
|
boolean |
isDegenerate()
|
boolean |
isHorizontal()
|
boolean |
isVertical()
|
void |
setToMatch(Line nother)
|
void |
setX1(float newX)
|
void |
setX2(float newX)
|
void |
setY1(float newY)
|
void |
setY2(float newY)
|
float |
solveForX(float y)
Finds the x for the given y. |
float |
solveForY(float x)
Finds the y for the given x. |
void |
sortBottomToTop()
Makes it run from bottom to top (so y1 <= y2) |
void |
sortLeftToRight()
Makes it run from left to right (so x1 <= x2) |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public float x1
public float y1
public float x2
public float y2
| Constructor Detail |
|---|
public Line()
public Line(float x1,
float y1,
float x2,
float y2)
| Method Detail |
|---|
public float getX1()
public void setX1(float newX)
public float getY1()
public void setY1(float newY)
public float getX2()
public void setX2(float newX)
public float getY2()
public void setY2(float newY)
public void setToMatch(Line nother)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isDegenerate()
public boolean isVertical()
public boolean isHorizontal()
public float getSlope()
public float getLength()
public boolean equals(Line nother)
public boolean equals(java.lang.Object nother)
equals in class java.lang.Objectpublic float solveForX(float y)
public float solveForY(float x)
public void sortLeftToRight()
public void sortBottomToTop()
public boolean clipToRectangle(Rectangle rectangle)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||