public class GeometryUtil
extends java.lang.Object
implements javax.swing.SwingConstants
Constructor and Description |
---|
GeometryUtil() |
Modifier and Type | Method and Description |
---|---|
static double |
cos(java.awt.geom.Line2D aLine) |
static java.awt.Shape |
getArrowShape(java.awt.geom.Line2D line,
java.awt.geom.Point2D intersectionPoint) |
static java.awt.geom.Line2D.Double |
getBottomOf(java.awt.Rectangle aRectangle) |
static int |
getClosestToLineRectangleCorner(java.awt.Rectangle aRectangle,
java.awt.geom.Line2D aSegment) |
static java.awt.Point |
getIntersectionPoint(java.awt.geom.Line2D aFirst,
java.awt.geom.Line2D aSecond) |
static java.awt.Point |
getIntersectionPoint(java.awt.geom.Line2D aSegment,
java.awt.Rectangle aRectangle) |
static java.awt.geom.Line2D.Double |
getLeftOf(java.awt.Rectangle aRectangle) |
static double |
getLineLength(double aX1,
double aY1,
double aX2,
double aY2) |
static int |
getPointPositionOnRectangle(java.awt.Rectangle aRectangle,
java.awt.Point aPoint,
int aEpsilon) |
static java.awt.geom.Line2D.Double |
getRightOf(java.awt.Rectangle aRectangle) |
static double |
getShiftByX(java.awt.geom.Line2D aLine,
double aPointDeltaX) |
static double |
getShiftByY(java.awt.geom.Line2D aLine,
double aPointDeltaY) |
static java.awt.geom.Line2D.Double |
getTopOf(java.awt.Rectangle aRectangle) |
static boolean |
intersects(java.awt.Rectangle aRectangle,
java.awt.geom.Line2D aLine) |
static boolean |
isWithin(java.awt.Rectangle aRectangle,
java.awt.geom.Point2D aPoint) |
static double |
sin(java.awt.geom.Line2D aLine) |
static java.lang.String |
toString(java.awt.geom.Line2D aLine) |
public static java.awt.Point getIntersectionPoint(java.awt.geom.Line2D aSegment, java.awt.Rectangle aRectangle)
public static java.awt.geom.Line2D.Double getLeftOf(java.awt.Rectangle aRectangle)
public static java.awt.geom.Line2D.Double getBottomOf(java.awt.Rectangle aRectangle)
public static java.awt.geom.Line2D.Double getRightOf(java.awt.Rectangle aRectangle)
public static java.awt.geom.Line2D.Double getTopOf(java.awt.Rectangle aRectangle)
public static boolean isWithin(java.awt.Rectangle aRectangle, java.awt.geom.Point2D aPoint)
public static java.awt.Point getIntersectionPoint(java.awt.geom.Line2D aFirst, java.awt.geom.Line2D aSecond)
public static java.lang.String toString(java.awt.geom.Line2D aLine)
public static boolean intersects(java.awt.Rectangle aRectangle, java.awt.geom.Line2D aLine)
public static int getPointPositionOnRectangle(java.awt.Rectangle aRectangle, java.awt.Point aPoint, int aEpsilon)
public static double getShiftByY(java.awt.geom.Line2D aLine, double aPointDeltaY)
public static double getShiftByX(java.awt.geom.Line2D aLine, double aPointDeltaX)
public static java.awt.Shape getArrowShape(java.awt.geom.Line2D line, java.awt.geom.Point2D intersectionPoint)
public static int getClosestToLineRectangleCorner(java.awt.Rectangle aRectangle, java.awt.geom.Line2D aSegment)
public static double getLineLength(double aX1, double aY1, double aX2, double aY2)
public static double cos(java.awt.geom.Line2D aLine)
public static double sin(java.awt.geom.Line2D aLine)