|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.util.java2d.ShapeUtilities
public final class ShapeUtilities
A set of utilities on Java2D shapes.
Constructor Summary | |
---|---|
ShapeUtilities()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShapeUtilities()
Method Detail |
---|
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |