public class ShapeUtils extends Object
| Constructor and Description |
|---|
ShapeUtils()
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equals(Shape
Return true if two shapes are equal.
|
static Point2D |
getPoint(Shape
TSimilar to tracing, this progresses a dot from the beginning to the end of this path.
|
static int |
getSubPathCount(Shape
Returns the number of separate paths in the shape provided.
|
static GeneralPath |
getSubPaths(Shape
Returns each path in s as a separate GeneralPath
|
static boolean |
isClosed(Shape
Return true if every subpath in the shape provided is closed.
|
static boolean |
isValid(Shape
Return false if any coordinates in this shape contain NaN or Infinite values.
|
static GeneralPath |
traceShape(Shape
This traces the shape provided.
|
public static boolean isValid(Shapeshape)
public static GeneralPathtraceShape(Shape shape, float progress)
This assumes every segment is equally important/long, which is not always the case.
shape -
progress - a float from [0,1], indicating what fraction of the shape provided should be traced.
public static Point2DgetPoint(Shape shape, float progress)
shape -
progress - a float from [0,1]
public static int getSubPathCount(Shapes)
public static GeneralPath[] getSubPaths(Shape s)
public static boolean isClosed(Shapeshape)
shape - the shape to inspect