|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.geom.Area
Constructor Summary | |
Area()
Default constructor which creates an empty area. |
|
Area(Shape g)
Creates an area geometry from the specified Shape object. |
Method Summary | |
void | add(Area rhs)
Adds the shape of the specified Area to the current shape. |
Object | clone()
clone function ... to be compatible with Cloneable |
boolean | contains(double x,
double y,
double w,
double h)
Tests whether the interior of the area completely contains the given rectangle. |
boolean | contains(double x,
double y)
Tests if a given coordinate lies inside the boundary of the shape. |
boolean | contains(Point2D p)
Tests if a given coordinate lies inside the boundary of the shape. |
boolean | contains(Rectangle2D r)
Tests whether the interior of the area completely contains the given rectangle. |
Area | createTransformedArea(AffineTransform t)
Creates a new Area from this Area object representing the geometry of the original transformed by the specified AffineTransform. |
boolean | equals(Area rhs)
Tests whether the two objects are equal. |
void | exclusiveOr(Area rhs)
Sets the shape of this Area to the combined area of the current shape and the shape of the specified Area, minus their intersection. |
Rectangle | getBounds()
Returns a bounding rectangle that completely encloses the area. |
Rectangle2D | getBounds2D()
Returns a high precision bounding rectangle that completely encloses the area. |
PathIterator | getPathIterator(AffineTransform t,
double f)
Create a PathIterator for the flattened outline of this Area object. |
PathIterator | getPathIterator(AffineTransform t)
Creates a PathIterator for the outline of this Area object. |
void | intersect(Area rhs)
Sets the shape of this Area to the intersection of the current shape with the shape of the specified Area. |
boolean | intersects(double x,
double y,
double w,
double h)
Tests whether the interior of the area intersects the interior of the given rectangle. |
boolean | intersects(Rectangle2D r)
Tests whether the interior of the area intersects the interior of the given rectangle. |
boolean | isEmpty()
Tests whether this area contains any geometry. |
boolean | isPolygonal()
Tests whether the area consists entirely of straight edged polygonal geometry. |
boolean | isRectangular()
Tests whether the area is rectangular in shape. |
boolean | isSingular()
Tests whether the area is comprised of a single basic geometry. |
void | reset()
Removes all the basic geometry from this area and restores it to an empty area. |
void | subtract(Area rhs)
Subtracts the shape of the specified Area from the current shape. |
void | transform(AffineTransform t)
Transforms the geometry of this Area using the specified transform. |
Methods inherited from class java.lang.Object | |
equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
public Area()
public Area(Shape g)
g
- The shape from which the area is to be constructed.Method Detail |
public void transform(AffineTransform t)
t
- The matrix used to transform the area.public void reset()
public boolean isEmpty()
public boolean isPolygonal()
public boolean isRectangular()
public boolean isSingular()
public Rectangle getBounds()
public Rectangle2D getBounds2D()
public boolean intersects(double x, double y, double w, double h)
public boolean intersects(Rectangle2D r)
r
- The rectangle to test for intersection.public boolean contains(double x, double y)
x
- x value of the point
y
- y value of the pointpublic boolean contains(Point2D p)
p
- The point to test for inclusion within the area.public boolean contains(double x, double y, double w, double h)
public boolean contains(Rectangle2D r)
r
- The rectangle to test for inclusion within the area.public void add(Area rhs)
rhs
- The shape to be added to the current area.public void subtract(Area rhs)
rhs
- The shape to be subtracted from the current area.public void intersect(Area rhs)
rhs
- The area to be intersected with this one.public void exclusiveOr(Area rhs)
rhs
- The area to be exclusive ORed with this one.public Object clone()
public boolean equals(Area rhs)
rhs
- The area geometry to be compared to this one.public PathIterator getPathIterator(AffineTransform t)
t
- an optional AffineTransform to be applied to the
coordinates as they are returned in the iteration, or null
if the untransformed coordinates are desired.public PathIterator getPathIterator(AffineTransform t, double f)
t
- an optional AffineTransform to be applied to the
coordinates as they are returned in the iteration, or null
if the untransformed coordinates are desired.
flatness
- the maximum amount that the control points
for a given curve can vary from colinear before a subdivided
curve is replaced by a straight line connecting the endpoints.public Area createTransformedArea(AffineTransform t)
t
- The transformation matrix used to transform the new area.
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |