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