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 doubledeterminant(AbstractLineSegment other)booleandoesIntersect(AbstractLineSegment other)booleanequals(java.lang.Object obj)doublegetAngle()java.awt.geom.Rectangle2DgetBounds2D()doublegetDistance(java.awt.geom.Point2D f)doublegetDistance(AbstractLineSegment other)doublegetIntersectionHorizontal(double yOther)doublegetIntersectionVertical(double xOther)doublegetLength()doublegetOppositeAngle()protected java.awt.geom.Point2D.DoublegetPoint2D(double u)java.awt.geom.Point2DgetSegIntersection(AbstractLineSegment other)inthashCode()booleanisHorizontal()booleanisPointOnSegment(java.awt.geom.Point2D pt)booleanisVertical()voidsetLine(double x1, double y1, double x2, double y2)doubleside(java.awt.geom.Point2D point)java.awt.geom.Point2D.DoublestartTranslatedAsVector(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:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCodein 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:
setLinein 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)
-
-