All Packages Class Hierarchy This Package Previous Next Index
Interface java.awt.Shape
- public interface Shape
The interface for objects which represent some form of geometric
shape.
This interface will be revised in the upcoming Java2D project.
It is meant to provide a common interface for various existing
geometric AWT classes and methods which operate on them. Since
it may be superseded or expanded in the future, developers should
avoid implementing this interface in their own classes until it
is completed in a later release.
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.
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.
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.
getBounds
public abstract Rectangle getBounds()
- Return the bounding box of the shape.
getBounds2D
public abstract Rectangle2D getBounds2D()
- Return the high precision bounding box of the shape.
contains
public abstract boolean contains(double x,
double y)
- Test if a given coordinate is inside the boundary of the shape.
contains
public abstract boolean contains(Point2D p)
- Test if a given Point is inside the boundary of the shape.
intersects
public abstract 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.
intersects
public abstract boolean intersects(Rectangle2D r)
- Test if the interior of the Shape intersects the interior of a given
Rectangle.
contains
public abstract 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.
contains
public abstract boolean contains(Rectangle2D r)
- Test if the interior of the Shape entirely contains the given
Rectangle.
getPathIterator
public abstract 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.
getPathIterator
public abstract 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.
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature