public class ShapeUtilities
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.awt.Shape |
createTransformedShape(java.awt.Shape src,
java.awt.geom.AffineTransform trans)
Apply a transformation to a Shape, trying to keep the type of the Shape.
|
static ShapeUtilities |
getInstance()
Return the unique instance of this class.
|
static double |
getRotationAngle(java.awt.geom.AffineTransform tr)
Return the rotation angle for an AffineTransform.
|
static java.awt.geom.AffineTransform |
getRotationTransform(java.awt.geom.AffineTransform tr)
Return the rotation Component of an AffineTransform.
|
boolean |
keepSimpleShape(java.awt.Shape src,
java.awt.geom.AffineTransform trans)
Return false if the transform will be delegated to the AffineTransform.
|
static boolean |
simpleShapeAsTransform(java.awt.Shape src,
java.awt.geom.AffineTransform trans)
Return false if the transform will be delegated to the AffineTransform.
|
java.awt.Shape |
transform(java.awt.Shape src,
java.awt.geom.AffineTransform trans)
Apply a transformation to a Shape, trying to keep the type of the Shape.
|
public static ShapeUtilities getInstance()
public static java.awt.Shape createTransformedShape(java.awt.Shape src,
java.awt.geom.AffineTransform trans)
src - the source Shapetrans - the AffineTransformtransform(Shape, AffineTransform)public static double getRotationAngle(java.awt.geom.AffineTransform tr)
tr - the AffineTransformpublic static java.awt.geom.AffineTransform getRotationTransform(java.awt.geom.AffineTransform tr)
tr - the AffineTransformpublic java.awt.Shape transform(java.awt.Shape src,
java.awt.geom.AffineTransform trans)
src - the source Shapetrans - the AffineTransformpublic static boolean simpleShapeAsTransform(java.awt.Shape src,
java.awt.geom.AffineTransform trans)
src - the source Shapetrans - the AffineTransformpublic boolean keepSimpleShape(java.awt.Shape src,
java.awt.geom.AffineTransform trans)
src - the source Shapetrans - the AffineTransformCopyright © 2021, 2022, 2025, 2026 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence