|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.util.ShapeUtils
ShapeUtilities.
Utility methods for Shape objects.
| Constructor Summary | |
ShapeUtils()
Deprecated. |
|
| Method Summary | |
static java.awt.Shape |
clone(java.awt.Shape shape)
Deprecated. Returns a clone of the specified shape, or null. |
static java.awt.Shape |
createDiagonalCross(float l,
float t)
Deprecated. Creates a diagonal cross shape. |
static java.awt.Shape |
createDiamond(float s)
Deprecated. Creates a diamond shape. |
static java.awt.Shape |
createDownTriangle(float s)
Deprecated. Creates a triangle shape that points downwards. |
static java.awt.Shape |
createLineRegion(java.awt.geom.Line2D line,
float width)
Deprecated. Creates a region surrounding a line segment by 'widening' the line segment. |
static java.awt.Shape |
createRegularCross(float l,
float t)
Deprecated. Creates a diagonal cross shape. |
static java.awt.Shape |
createUpTriangle(float s)
Deprecated. Creates a triangle shape that points upwards. |
static void |
drawRotatedShape(java.awt.Graphics2D g2,
java.awt.Shape shape,
double angle,
float x,
float y)
Deprecated. Draws a shape with the specified rotation about (x, y). |
static boolean |
equal(java.awt.Polygon p1,
java.awt.Polygon p2)
Deprecated. Tests two polygons for equality. |
static java.awt.geom.Point2D |
getPointInRectangle(double x,
double y,
java.awt.geom.Rectangle2D area)
Deprecated. Returns a point based on (x, y) but constrained to be within the bounds of a given rectangle. |
static java.awt.Shape |
rotateShape(java.awt.Shape base,
double angle,
float x,
float y)
Deprecated. Rotates a shape about the specified coordinates. |
static java.awt.Shape |
translateShape(java.awt.Shape shape,
double transX,
double transY)
Deprecated. Returns a translated shape. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ShapeUtils()
| Method Detail |
public static java.awt.Shape clone(java.awt.Shape shape)
null. At the current time, this
method supports cloning for instances of Line2D, RectangularShape,
Area and GeneralPath.
RectangularShape includes Arc2D, Ellipse2D,
Rectangle2D, RoundRectangle2D.
shape - the shape to clone (null permitted, returns null).
null.
public static boolean equal(java.awt.Polygon p1,
java.awt.Polygon p2)
null this method
returns true.
p1 - polygon 1 (null permitted).p2 - polygon 2 (null permitted).
public static java.awt.Shape translateShape(java.awt.Shape shape,
double transX,
double transY)
shape - the shape (null not permitted).transX - the x translation.transY - the y translation.
public static java.awt.Shape rotateShape(java.awt.Shape base,
double angle,
float x,
float y)
base - the shape (null permitted, returns null).angle - the angle (in radians).x - the x coordinate for the rotation point (in Java2D space).y - the y coordinate for the rotation point (in Java2D space).
public static void drawRotatedShape(java.awt.Graphics2D g2,
java.awt.Shape shape,
double angle,
float x,
float y)
(x, y).
g2 - the graphics device (null not permitted).shape - the shape (null not permitted).angle - the angle (in radians).x - the x coordinate for the rotation point.y - the y coordinate for the rotation point.
public static java.awt.Shape createDiagonalCross(float l,
float t)
l - the length of each 'arm'.t - the thickness.
public static java.awt.Shape createRegularCross(float l,
float t)
l - the length of each 'arm'.t - the thickness.
public static java.awt.Shape createDiamond(float s)
s - the size factor (equal to half the height of the diamond).
public static java.awt.Shape createUpTriangle(float s)
s - the size factor (equal to half the height of the triangle).
public static java.awt.Shape createDownTriangle(float s)
s - the size factor (equal to half the height of the triangle).
public static java.awt.Shape createLineRegion(java.awt.geom.Line2D line,
float width)
line - the line (null not permitted).width - the width of the region.
public static java.awt.geom.Point2D getPointInRectangle(double x,
double y,
java.awt.geom.Rectangle2D area)
x - the x-coordinate.y - the y-coordinate.area - the constraining rectangle (null not permitted).
java.lang.NullPointerException - if area is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||