|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatt.grappa.GrappaShape
public class GrappaShape
This class provides a flexible, parameterized polygonal shape builder. The guts of a GrappaShape is a GeneralPath object.
Field Summary | |
---|---|
private static double |
CIRCLE_XDIAG
|
private static double |
CIRCLE_YDIAG
|
protected java.awt.geom.GeneralPath |
path
path that defines shape |
private static double |
RBCONST
|
private static double |
RBCURVE
|
Constructor Summary | |
---|---|
GrappaShape(int type,
double x,
double y,
double width,
double height,
int sidesArg,
int peripheriesArg,
double distortionArg,
double skewArg,
double orientationArg,
boolean roundedArg,
boolean diagonalsArg,
java.lang.Object extra)
Constructs a new GrappaShape object. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates a new object of the same class as this object. |
boolean |
contains(double x,
double y)
|
boolean |
contains(double x,
double y,
double width,
double height)
|
boolean |
contains(java.awt.geom.Point2D p)
|
boolean |
contains(java.awt.geom.Rectangle2D r)
|
java.awt.Rectangle |
getBounds()
|
java.awt.geom.Rectangle2D |
getBounds2D()
|
java.awt.geom.PathIterator |
getPathIterator()
Equivalent to getPathIterator(null). |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
|
boolean |
intersects(double x,
double y,
double width,
double height)
|
boolean |
intersects(java.awt.geom.Rectangle2D r)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.geom.GeneralPath path
private static final double RBCONST
private static final double RBCURVE
private static final double CIRCLE_XDIAG
private static final double CIRCLE_YDIAG
Constructor Detail |
---|
public GrappaShape(int type, double x, double y, double width, double height, int sidesArg, int peripheriesArg, double distortionArg, double skewArg, double orientationArg, boolean roundedArg, boolean diagonalsArg, java.lang.Object extra)
GrappaShape
object.
The winding rule for this path is defaulted (from Grappa.windingRule).
type
- the shape specifier (.e.g., EGG_SHAPE).x
- the x-coordinate of the polygon center point.y
- the y-coordinate of the polygon center point.width
- the overall width of the polygon bounding box.height
- the overall height of the polygon bounding box.sidesArg
- the number of sides of the polygon.peripheriesArg
- the number of peripheries (outlines) of the polygon.distortionArg
- a distortion factor applied to the polygon shape, when non-zeroskewArg
- a skewing factor applied to the polygon shape, when non-zeroorientationArg
- an orientation angle in radians.roundedArg
- a directive to round the corners.diagonalsArg
- a directive to draw catercorners at the vertices.extra
- used only with the record shape at present, it provides a string of tuples giving interior partition information.Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
java.lang.OutOfMemoryError
- if there is not enough memory.Cloneable
public final boolean contains(double x, double y)
contains
in interface java.awt.Shape
public final boolean contains(double x, double y, double width, double height)
contains
in interface java.awt.Shape
public final boolean contains(java.awt.geom.Point2D p)
contains
in interface java.awt.Shape
public final boolean contains(java.awt.geom.Rectangle2D r)
contains
in interface java.awt.Shape
public final java.awt.Rectangle getBounds()
getBounds
in interface java.awt.Shape
public final java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface java.awt.Shape
public final java.awt.geom.PathIterator getPathIterator()
getPathIterator(AffineTransform)
public final java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator
in interface java.awt.Shape
public final java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
getPathIterator
in interface java.awt.Shape
public final boolean intersects(double x, double y, double width, double height)
intersects
in interface java.awt.Shape
public final boolean intersects(java.awt.geom.Rectangle2D r)
intersects
in interface java.awt.Shape
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |