|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.v3x.graphics.DoubleLine
public class DoubleLine
A double-precision line class.
| Field Summary | |
|---|---|
double |
x1
|
double |
x2
|
double |
y1
|
double |
y2
|
| Constructor Summary | |
|---|---|
DoubleLine()
|
|
DoubleLine(double x1,
double y1,
double x2,
double y2)
|
|
| Method Summary | |
|---|---|
boolean |
clipToRectangle(DoubleRectangle rectangle)
Clip this line to rectangle. |
boolean |
equals(DoubleLine nother)
|
boolean |
equals(java.lang.Object nother)
|
double |
getLength()
|
double |
getSlope()
|
double |
getX1()
|
double |
getX2()
|
double |
getY1()
|
double |
getY2()
|
boolean |
isDegenerate()
|
boolean |
isHorizontal()
|
boolean |
isVertical()
|
void |
setToMatch(DoubleLine nother)
|
void |
setX1(double newX)
|
void |
setX2(double newX)
|
void |
setY1(double newY)
|
void |
setY2(double newY)
|
double |
solveForX(double y)
Finds the x for the given y. |
double |
solveForY(double 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 double x1
public double y1
public double x2
public double y2
| Constructor Detail |
|---|
public DoubleLine()
public DoubleLine(double x1,
double y1,
double x2,
double y2)
| Method Detail |
|---|
public double getX1()
public void setX1(double newX)
public double getY1()
public void setY1(double newY)
public double getX2()
public void setX2(double newX)
public double getY2()
public void setY2(double newY)
public void setToMatch(DoubleLine nother)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isDegenerate()
public boolean isVertical()
public boolean isHorizontal()
public double getSlope()
public double getLength()
public boolean equals(DoubleLine nother)
public boolean equals(java.lang.Object nother)
equals in class java.lang.Objectpublic double solveForX(double y)
public double solveForY(double x)
public void sortLeftToRight()
public void sortBottomToTop()
public boolean clipToRectangle(DoubleRectangle rectangle)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||