All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.geom.Area
java.lang.Object
|
+----sun.awt.Albert.Area
|
+----java.awt.geom.Area
- public class Area
- extends Area
EmptyArea- Constant area geometry that is empty.
Area()
- Default constructor which creates an empty area.
Area(Ellipse2D)
- Creates an area geometry of a ellipse inside the specified rectangle.
Area(Polygon)
- Creates an area geometry from the specified polygon.
Area(Rectangle2D)
- Creates an area geometry from the specified rectangle.
Area(Shape)
- Creates an area geometry from the specified Shape object.
add(Area)
- Adds the shape of the specified Area to the current shape.
contains(double, double)
- Test if a given coordinate is inside the boundary of the shape.
contains(double, double, double, double)
- Test if the interior of the Shape entirely contains the given
set of rectangular coordinates.
contains(Point2D)
- Test if a given Point is inside the boundary of the shape.
contains(Rectangle2D)
- Test if the interior of the Shape entirely contains the given
Rectangle.
exclusiveOr(Area)
- Sets the shape to the combined area of the current shape
and the shape of the specified Area, minus their intersection.
getBounds()
- Return the bounding box of the shape.
getBounds2D()
- Return the high precision bounding box of the shape.
getPathIterator(AffineTransform)
- Return an iterator object that iterates along the boundary of
the shape and provides access to the geometry of the outline
of the shape.
getPathIterator(AffineTransform, double)
- Return an iterator object that iterates along the boundary of
the shape and provides access to a flattened view of the
geometry of the outline of the shape.
intersect(Area)
- Sets the shape to the intersection of the current shape with
the shape of the specified Area.
intersects(double, double, double, double)
- Test if the interior of the Shape intersects the interior of a given
set of rectangular coordinates.
intersects(Rectangle2D)
- Test if the interior of the Shape intersects the interior of a given
Rectangle.
isEmpty()
- Tests whether this area contains any geometries.
isPolygonal()
- Tests whether the area comprises completely of horizontal
and vertical edges.
isRectangular()
- Tests whether the area is rectangular in shape.
isSingular()
- Tests whether the area is comprised of a single basic geometry.
reset()
- Removes all the basic geometries from this area and results
in an empty area.
subtract(Area)
- Subtracts the shape of the specified Area from the current shape.
EmptyArea
public static Area EmptyArea
- Constant area geometry that is empty.
Rendering such geometry will have no effect (NOP).
Area
public Area()
- Default constructor which creates an empty area.
Area
public Area(Shape g)
- Creates an area geometry from the specified Shape object.
The shape is explicitly closed, if it is not closed.
The fill option (even-odd or winding) specified by the shape
geometry is used to determined the resulting area.
- Parameters:
- g - The shape from which the area is to be constructed.
Area
public Area(Polygon p)
- Creates an area geometry from the specified polygon.
Even-odd fill option is assumed (because that is how awt Polygon
is defined).
- Parameters:
- p - The polygon from which the area is to be constructed.
Area
public Area(Rectangle2D r)
- Creates an area geometry from the specified rectangle.
- Parameters:
- r - The rectangle from which the area is to be constructed.
Area
public Area(Ellipse2D e)
- Creates an area geometry of a ellipse inside the specified rectangle.
- Parameters:
- e - The ellipse geometry from which the area is to be constructed
getBounds
public Rectangle getBounds()
- Return the bounding box of the shape.
- Overrides:
- getBounds in class Area
getBounds2D
public Rectangle2D getBounds2D()
- Return the high precision bounding box of the shape.
- Overrides:
- getBounds2D in class Area
contains
public boolean contains(double x,
double y)
- Test if a given coordinate is inside the boundary of the shape.
- Overrides:
- contains in class Area
contains
public boolean contains(Point2D p)
- Test if a given Point is inside the boundary of the shape.
- Overrides:
- contains in class Area
intersects
public boolean intersects(double x,
double y,
double w,
double h)
- Test if the interior of the Shape intersects the interior of a given
set of rectangular coordinates.
- Overrides:
- intersects in class Area
intersects
public boolean intersects(Rectangle2D r)
- Test if the interior of the Shape intersects the interior of a given
Rectangle.
- Overrides:
- intersects in class Area
contains
public boolean contains(double x,
double y,
double w,
double h)
- Test if the interior of the Shape entirely contains the given
set of rectangular coordinates.
- Overrides:
- contains in class Area
contains
public boolean contains(Rectangle2D r)
- Test if the interior of the Shape entirely contains the given
Rectangle.
- Overrides:
- contains in class Area
getPathIterator
public PathIterator getPathIterator(AffineTransform at)
- Return an iterator object that iterates along the boundary of
the shape and provides access to the geometry of the outline
of the shape.
An optional affine transform can be specified in which case
the coordinates returned in the iteration will be transformed
accordingly.
- Parameters:
- at - an optional AffineTransform to be applied to the
coordinates as they are returned in the iteration, or null
if the untransformed coordinates are desired.
- Overrides:
- getPathIterator in class Area
getPathIterator
public PathIterator getPathIterator(AffineTransform at,
double flatness)
- Return an iterator object that iterates along the boundary of
the shape and provides access to a flattened view of the
geometry of the outline of the shape.
Only SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types will
be returned by the iterator.
The amount of subdivision of the curved segments is controlled
by the
flatness
parameter which specifies ?REMIND?.
An optional affine transform can be specified in which case
the coordinates returned in the iteration will be transformed
accordingly.
- Parameters:
- at - 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.
- Overrides:
- getPathIterator in class Area
reset
public void reset()
- Removes all the basic geometries from this area and results
in an empty area.
- Overrides:
- reset in class Area
isEmpty
public boolean isEmpty()
- Tests whether this area contains any geometries.
- Returns:
- True if this area contains no basic geometries,
or is an empty area.
- Overrides:
- isEmpty in class Area
isPolygonal
public boolean isPolygonal()
- Tests whether the area comprises completely of horizontal
and vertical edges.
- Returns:
- True if the area comprises completely of
horizontal and vertical edges.
- Overrides:
- isPolygonal in class Area
isRectangular
public boolean isRectangular()
- Tests whether the area is rectangular in shape.
- Returns:
- True if the area is rectangular in shape.
- Overrides:
- isRectangular in class Area
isSingular
public boolean isSingular()
- Tests whether the area is comprised of a single basic geometry.
- Returns:
- True if the area is comprised of a single
basic geometry.
- Overrides:
- isSingular in class Area
add
public void add(Area rhs)
- Adds the shape of the specified Area to the current shape.
Addition is achieved through union.
- Parameters:
- rhs - The shape to be added to the current area.
subtract
public void subtract(Area rhs)
- Subtracts the shape of the specified Area from the current shape.
- Parameters:
- rhs - The shape to be subtracted from the current area.
intersect
public void intersect(Area rhs)
- Sets the shape to the intersection of the current shape with
the shape of the specified Area.
- Parameters:
- rhs - The area to be intersected with this one.
exclusiveOr
public void exclusiveOr(Area rhs)
- Sets the shape to the combined area of the current shape
and the shape of the specified Area, minus their intersection.
- Parameters:
- rhs - The area to be exclusive ORed with this one.
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature