Package net.sourceforge.plantuml.geom
Class AbstractLineSegment
- java.lang.Object
-
- java.awt.geom.Line2D
-
- net.sourceforge.plantuml.geom.AbstractLineSegment
-
- All Implemented Interfaces:
java.awt.Shape
,java.lang.Cloneable
- Direct Known Subclasses:
LineSegmentDouble
,LineSegmentInt
public abstract class AbstractLineSegment extends java.awt.geom.Line2D
-
-
Constructor Summary
Constructors Constructor Description AbstractLineSegment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
determinant(AbstractLineSegment other)
boolean
doesIntersect(AbstractLineSegment other)
boolean
equals(java.lang.Object obj)
double
getAngle()
java.awt.geom.Rectangle2D
getBounds2D()
double
getDistance(java.awt.geom.Point2D f)
double
getDistance(AbstractLineSegment other)
double
getIntersectionHorizontal(double yOther)
double
getIntersectionVertical(double xOther)
double
getLength()
double
getOppositeAngle()
protected java.awt.geom.Point2D.Double
getPoint2D(double u)
java.awt.geom.Point2D
getSegIntersection(AbstractLineSegment other)
int
hashCode()
boolean
isHorizontal()
boolean
isPointOnSegment(java.awt.geom.Point2D pt)
boolean
isVertical()
void
setLine(double x1, double y1, double x2, double y2)
double
side(java.awt.geom.Point2D point)
java.awt.geom.Point2D.Double
startTranslatedAsVector(double u)
-
Methods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, contains, getBounds, getP1, getP2, getPathIterator, getPathIterator, getX1, getX2, getY1, getY2, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine
-
-
-
-
Method Detail
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getLength
public final double getLength()
-
getPoint2D
protected final java.awt.geom.Point2D.Double getPoint2D(double u)
-
getDistance
public final double getDistance(java.awt.geom.Point2D f)
-
getSegIntersection
public java.awt.geom.Point2D getSegIntersection(AbstractLineSegment other)
-
getIntersectionVertical
public double getIntersectionVertical(double xOther)
-
getIntersectionHorizontal
public double getIntersectionHorizontal(double yOther)
-
setLine
public final void setLine(double x1, double y1, double x2, double y2)
- Specified by:
setLine
in classjava.awt.geom.Line2D
-
getBounds2D
public final java.awt.geom.Rectangle2D getBounds2D()
-
isHorizontal
public final boolean isHorizontal()
-
isVertical
public final boolean isVertical()
-
getDistance
public final double getDistance(AbstractLineSegment other)
-
isPointOnSegment
public boolean isPointOnSegment(java.awt.geom.Point2D pt)
-
getAngle
public final double getAngle()
-
getOppositeAngle
public final double getOppositeAngle()
-
startTranslatedAsVector
public final java.awt.geom.Point2D.Double startTranslatedAsVector(double u)
-
doesIntersect
public boolean doesIntersect(AbstractLineSegment other)
-
determinant
public double determinant(AbstractLineSegment other)
-
side
public double side(java.awt.geom.Point2D point)
-
-