gov.nih.nci.cagrid.graph.geometry
Class LineSegment
java.lang.Object
gov.nih.nci.cagrid.graph.geometry.LineSegment
public class LineSegment
- extends java.lang.Object
|
Field Summary |
static int |
BOTTOM
|
static int |
DOWN
|
static int |
EVEN
|
static int |
LEFT
|
java.awt.Point |
p1
|
java.awt.Point |
p2
|
static int |
RIGHT
|
static int |
TOP
|
static int |
UP
|
|
Constructor Summary |
LineSegment(int x1,
int y1,
int x2,
int y2)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
p1
public java.awt.Point p1
p2
public java.awt.Point p2
LEFT
public static final int LEFT
- See Also:
- Constant Field Values
RIGHT
public static final int RIGHT
- See Also:
- Constant Field Values
UP
public static final int UP
- See Also:
- Constant Field Values
DOWN
public static final int DOWN
- See Also:
- Constant Field Values
EVEN
public static final int EVEN
- See Also:
- Constant Field Values
TOP
public static final int TOP
- See Also:
- Constant Field Values
BOTTOM
public static final int BOTTOM
- See Also:
- Constant Field Values
LineSegment
public LineSegment(int x1,
int y1,
int x2,
int y2)
getSway
public int getSway(LineSegment ls,
int orientation)
getIntersection
public FloatingPoint getIntersection(LineSegment ls)
isVertical
public boolean isVertical()
isHorizontal
public boolean isHorizontal()
isParallel
public boolean isParallel(LineSegment ls)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
cutsRectangle
public float cutsRectangle(java.awt.Rectangle r)