public class GeomUtil extends java.lang.Object
Constructor and Description |
---|
GeomUtil() |
Modifier and Type | Method and Description |
---|---|
static java.awt.geom.Point2D |
getIntersection(java.awt.geom.Line2D lineA,
java.awt.geom.Line2D lineB)
Get intersection point between 2 lines.
|
static java.awt.geom.Point2D |
getIntersection(java.awt.geom.Line2D lineA,
java.awt.geom.Line2D lineB,
boolean limitToSegmentA,
boolean limitToSegmentB)
Get intersection point between 2 lines.
|
static double |
getRotation(java.awt.geom.AffineTransform transform)
Returns rotation information from AffineTransform.
|
static double |
getRotationFast(java.awt.geom.AffineTransform transform)
Returns rotation information from AffineTransform (fast method).
|
static double |
getScale(java.awt.geom.AffineTransform transform)
Returns uniform scale (X=Y) information from AffineTransform.
|
static double |
getScaleX(java.awt.geom.AffineTransform transform)
Returns scale X information from AffineTransform.
|
static double |
getScaleY(java.awt.geom.AffineTransform transform)
Returns scale Y information from AffineTransform.
|
public GeomUtil()
public static java.awt.geom.Point2D getIntersection(java.awt.geom.Line2D lineA, java.awt.geom.Line2D lineB)
null
if the 2 lines are //public static java.awt.geom.Point2D getIntersection(java.awt.geom.Line2D lineA, java.awt.geom.Line2D lineB, boolean limitToSegmentA, boolean limitToSegmentB)
lineA
- first linelineB
- second linelimitToSegmentA
- Limit intersection to segment lineA, if intersection point is outside lineA then
null
is returnedlimitToSegmentB
- Limit intersection to segment lineB, if intersection point is outside lineB then
null
is returnedpublic static double getRotation(java.awt.geom.AffineTransform transform)
public static double getRotationFast(java.awt.geom.AffineTransform transform)
public static double getScale(java.awt.geom.AffineTransform transform)
public static double getScaleX(java.awt.geom.AffineTransform transform)
public static double getScaleY(java.awt.geom.AffineTransform transform)