|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.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 Rectangle2D |
computeStrokedBounds(Shape shape,
Stroke stroke)
Compute the bounds of a shape when stroked with the given stroke. |
static Shape |
createCloudShape()
Create the "cloud" shape. |
static Shape |
createSwatchShape()
Create the "swatch" shape. |
static BasicStroke |
getStroke(float floatwidth)
Get a new stroke of the given width and with no dashing. |
static BasicStroke |
getStroke(int width)
Get a stroke of the given width and with no dashing. |
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 boolean |
jdk12beta4()
Test if we are running in JDK1.2beta4 |
static void |
main(String[] argv)
Main function. |
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)
In-place transform of a rectangular shape. |
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 boolean jdk12beta4()
public static Shape cloneShape(Shape s)
public static Shape createCloudShape()
public static Shape createSwatchShape()
public static Rectangle2D computeStrokedBounds(Shape shape, Stroke stroke)
public static BasicStroke getStroke(int width)
public static BasicStroke getStroke(float floatwidth)
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)
public static void main(String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |