public final class ShapeUtilities extends Object
Constructor and Description |
---|
ShapeUtilities() |
Modifier and Type | Method and Description |
---|---|
static Shape |
cloneShape(Shape s)
Clone a shape.
|
static Shape |
createCloudShape()
Create the "cloud" shape.
|
static Shape |
createSwatchShape()
Create the "swatch" shape.
|
static boolean |
intersectsOutline(Rectangle2D r,
Shape s)
Return true if the outline of the given shape intersects with the
given rectangle.
|
static boolean |
isOrthogonal(AffineTransform at)
Return true if the given transform maps a rectangle
to a rectangle.
|
static String |
printShapeAsCode(String name,
Shape shape)
Print a Shape to a String, as a code fragment that creates
a new GeneralPath.
|
static Rectangle2D |
transformBounds(Rectangle2D rect,
AffineTransform at)
Given a bounding-box rectangle, return a new rectangle
by transforming the argument rectangle and taking the bounding
box of the result.
|
static Shape |
transformModify(Shape s,
AffineTransform at)
Transform a shape with the supplied transform.
|
static void |
transformModifyRect(RectangularShape s,
AffineTransform at)
Transform a rectangular shape with an orthogonal transform.
|
static Shape |
translateModify(Shape s,
double x,
double y)
Translate a shape the given distance.
|
public static Shape cloneShape(Shape s)
public static Shape createCloudShape()
public static Shape createSwatchShape()
public static boolean intersectsOutline(Rectangle2D r, Shape s)
public static boolean isOrthogonal(AffineTransform at)
public static String printShapeAsCode(String name, Shape shape)
public static Rectangle2D transformBounds(Rectangle2D rect, AffineTransform at)
public static void transformModifyRect(RectangularShape s, AffineTransform at)
public static Shape transformModify(Shape s, AffineTransform at)
public static Shape translateModify(Shape s, double x, double y)
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.