java.awt.geom
Class RectangularShape

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.geom.RectangularShape
All Implemented Interfaces:
Shape sample code for java.awt.Shape definition code for java.awt.Shape , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable
Direct Known Subclasses:
Arc2D sample code for java.awt.geom.Arc2D definition code for java.awt.geom.Arc2D , Ellipse2D sample code for java.awt.geom.Ellipse2D definition code for java.awt.geom.Ellipse2D , Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D , RoundRectangle2D sample code for java.awt.geom.RoundRectangle2D definition code for java.awt.geom.RoundRectangle2D

public abstract class RectangularShape
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Shape sample code for java.awt.Shape definition code for java.awt.Shape , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable

RectangularShape is the base class for a number of Shape sample code for java.awt.Shape definition code for java.awt.Shape objects whose geometry is defined by a rectangular frame. This class does not directly specify any specific geometry by itself, but merely provides manipulation methods inherited by a whole category of Shape objects. The manipulation methods provided by this class can be used to query and modify the rectangular frame, which provides a reference for the subclasses to define their geometry.


Constructor Summary
protected RectangularShape sample code for java.awt.geom.RectangularShape.RectangularShape() definition code for java.awt.geom.RectangularShape.RectangularShape() ()
          This is an abstract class that cannot be instantiated directly.
 
Method Summary
 Object sample code for java.lang.Object definition code for java.lang.Object clone sample code for java.awt.geom.RectangularShape.clone() definition code for java.awt.geom.RectangularShape.clone() ()
          Creates a new object of the same class and with the same contents as this object.
 boolean contains sample code for java.awt.geom.RectangularShape.contains(java.awt.geom.Point2D) definition code for java.awt.geom.RectangularShape.contains(java.awt.geom.Point2D) (Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  p)
          Tests if a specified Point2D is inside the boundary of the Shape.
 boolean contains sample code for java.awt.geom.RectangularShape.contains(java.awt.geom.Rectangle2D) definition code for java.awt.geom.RectangularShape.contains(java.awt.geom.Rectangle2D) (Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D  r)
          Tests if the interior of the Shape entirely contains the specified Rectangle2D.
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getBounds sample code for java.awt.geom.RectangularShape.getBounds() definition code for java.awt.geom.RectangularShape.getBounds() ()
          Returns the bounding box of the Shape.
 double getCenterX sample code for java.awt.geom.RectangularShape.getCenterX() definition code for java.awt.geom.RectangularShape.getCenterX() ()
          Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.
 double getCenterY sample code for java.awt.geom.RectangularShape.getCenterY() definition code for java.awt.geom.RectangularShape.getCenterY() ()
          Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.
 Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D getFrame sample code for java.awt.geom.RectangularShape.getFrame() definition code for java.awt.geom.RectangularShape.getFrame() ()
          Returns the framing Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D that defines the overall shape of this object.
abstract  double getHeight sample code for java.awt.geom.RectangularShape.getHeight() definition code for java.awt.geom.RectangularShape.getHeight() ()
          Returns the height of the framing rectangle in double precision.
 double getMaxX sample code for java.awt.geom.RectangularShape.getMaxX() definition code for java.awt.geom.RectangularShape.getMaxX() ()
          Returns the largest X coordinate of the framing rectangle of the Shape in double precision.
 double getMaxY sample code for java.awt.geom.RectangularShape.getMaxY() definition code for java.awt.geom.RectangularShape.getMaxY() ()
          Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.
 double getMinX sample code for java.awt.geom.RectangularShape.getMinX() definition code for java.awt.geom.RectangularShape.getMinX() ()
          Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.
 double getMinY sample code for java.awt.geom.RectangularShape.getMinY() definition code for java.awt.geom.RectangularShape.getMinY() ()
          Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.
 PathIterator sample code for java.awt.geom.PathIterator definition code for java.awt.geom.PathIterator getPathIterator sample code for java.awt.geom.RectangularShape.getPathIterator(java.awt.geom.AffineTransform, double) definition code for java.awt.geom.RectangularShape.getPathIterator(java.awt.geom.AffineTransform, double) (AffineTransform sample code for java.awt.geom.AffineTransform definition code for java.awt.geom.AffineTransform  at, double flatness)
          Returns an iterator object that iterates along the Shape object's boundary and provides access to a flattened view of the outline of the Shape object's geometry.
abstract  double getWidth sample code for java.awt.geom.RectangularShape.getWidth() definition code for java.awt.geom.RectangularShape.getWidth() ()
          Returns the width of the framing rectangle in double precision.
abstract  double getX sample code for java.awt.geom.RectangularShape.getX() definition code for java.awt.geom.RectangularShape.getX() ()
          Returns the X coordinate of the upper left corner of the framing rectangle in double precision.
abstract  double getY sample code for java.awt.geom.RectangularShape.getY() definition code for java.awt.geom.RectangularShape.getY() ()
          Returns the Y coordinate of the upper left corner of the framing rectangle in double precision.
 boolean intersects sample code for java.awt.geom.RectangularShape.intersects(java.awt.geom.Rectangle2D) definition code for java.awt.geom.RectangularShape.intersects(java.awt.geom.Rectangle2D) (Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D  r)
          Tests if the interior of theShape intersects the interior of a specified Rectangle2D.
abstract  boolean isEmpty sample code for java.awt.geom.RectangularShape.isEmpty() definition code for java.awt.geom.RectangularShape.isEmpty() ()
          Determines whether the RectangularShape is empty.
abstract  void setFrame sample code for java.awt.geom.RectangularShape.setFrame(double, double, double, double) definition code for java.awt.geom.RectangularShape.setFrame(double, double, double, double) (double x, double y, double w, double h)
          Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.
 void setFrame sample code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Point2D, java.awt.geom.Dimension2D) definition code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Point2D, java.awt.geom.Dimension2D) (Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  loc, Dimension2D sample code for java.awt.geom.Dimension2D definition code for java.awt.geom.Dimension2D  size)
          Sets the location and size of the framing rectangle of this Shape to the specified Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D and Dimension2D sample code for java.awt.geom.Dimension2D definition code for java.awt.geom.Dimension2D , respectively.
 void setFrame sample code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Rectangle2D) definition code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Rectangle2D) (Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D  r)
          Sets the framing rectangle of this Shape to be the specified Rectangle2D.
 void setFrameFromCenter sample code for java.awt.geom.RectangularShape.setFrameFromCenter(double, double, double, double) definition code for java.awt.geom.RectangularShape.setFrameFromCenter(double, double, double, double) (double centerX, double centerY, double cornerX, double cornerY)
          Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates.
 void setFrameFromCenter sample code for java.awt.geom.RectangularShape.setFrameFromCenter(java.awt.geom.Point2D, java.awt.geom.Point2D) definition code for java.awt.geom.RectangularShape.setFrameFromCenter(java.awt.geom.Point2D, java.awt.geom.Point2D) (Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  center, Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  corner)
          Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D.
 void setFrameFromDiagonal sample code for java.awt.geom.RectangularShape.setFrameFromDiagonal(double, double, double, double) definition code for java.awt.geom.RectangularShape.setFrameFromDiagonal(double, double, double, double) (double x1, double y1, double x2, double y2)
          Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates.
 void setFrameFromDiagonal sample code for java.awt.geom.RectangularShape.setFrameFromDiagonal(java.awt.geom.Point2D, java.awt.geom.Point2D) definition code for java.awt.geom.RectangularShape.setFrameFromDiagonal(java.awt.geom.Point2D, java.awt.geom.Point2D) (Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  p1, Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  p2)
          Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 
Methods inherited from interface java.awt.Shape sample code for java.awt.Shape definition code for java.awt.Shape
contains sample code for java.awt.Shape.contains(double, double) definition code for java.awt.Shape.contains(double, double) , contains sample code for java.awt.Shape.contains(double, double, double, double) definition code for java.awt.Shape.contains(double, double, double, double) , getBounds2D sample code for java.awt.Shape.getBounds2D() definition code for java.awt.Shape.getBounds2D() , getPathIterator sample code for java.awt.Shape.getPathIterator(java.awt.geom.AffineTransform) definition code for java.awt.Shape.getPathIterator(java.awt.geom.AffineTransform) , intersects sample code for java.awt.Shape.intersects(double, double, double, double) definition code for java.awt.Shape.intersects(double, double, double, double)
 

Constructor Detail

RectangularShape sample code for java.awt.geom.RectangularShape() definition code for java.awt.geom.RectangularShape()

protected RectangularShape()
This is an abstract class that cannot be instantiated directly.

See Also:
Arc2D sample code for java.awt.geom.Arc2D definition code for java.awt.geom.Arc2D , Ellipse2D sample code for java.awt.geom.Ellipse2D definition code for java.awt.geom.Ellipse2D , Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D , RoundRectangle2D sample code for java.awt.geom.RoundRectangle2D definition code for java.awt.geom.RoundRectangle2D
Method Detail

getX sample code for java.awt.geom.RectangularShape.getX() definition code for java.awt.geom.RectangularShape.getX()

public abstract double getX()
Returns the X coordinate of the upper left corner of the framing rectangle in double precision.

Returns:
the x coordinate of the upper left corner of the framing rectangle.

getY sample code for java.awt.geom.RectangularShape.getY() definition code for java.awt.geom.RectangularShape.getY()

public abstract double getY()
Returns the Y coordinate of the upper left corner of the framing rectangle in double precision.

Returns:
the y coordinate of the upper left corner of the framing rectangle.

getWidth sample code for java.awt.geom.RectangularShape.getWidth() definition code for java.awt.geom.RectangularShape.getWidth()

public abstract double getWidth()
Returns the width of the framing rectangle in double precision.

Returns:
the width of the framing rectangle.

getHeight sample code for java.awt.geom.RectangularShape.getHeight() definition code for java.awt.geom.RectangularShape.getHeight()

public abstract double getHeight()
Returns the height of the framing rectangle in double precision.

Returns:
the height of the framing rectangle.

getMinX sample code for java.awt.geom.RectangularShape.getMinX() definition code for java.awt.geom.RectangularShape.getMinX()

public double getMinX()
Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.

Returns:
the smallest x coordinate of the framing rectangle of the Shape.

getMinY sample code for java.awt.geom.RectangularShape.getMinY() definition code for java.awt.geom.RectangularShape.getMinY()

public double getMinY()
Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.

Returns:
the smallest y coordinate of the framing rectangle of the Shape.

getMaxX sample code for java.awt.geom.RectangularShape.getMaxX() definition code for java.awt.geom.RectangularShape.getMaxX()

public double getMaxX()
Returns the largest X coordinate of the framing rectangle of the Shape in double precision.

Returns:
the largest x coordinate of the framing rectangle of the Shape.

getMaxY sample code for java.awt.geom.RectangularShape.getMaxY() definition code for java.awt.geom.RectangularShape.getMaxY()

public double getMaxY()
Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.

Returns:
the largest y coordinate of the framing rectangle of the Shape.

getCenterX sample code for java.awt.geom.RectangularShape.getCenterX() definition code for java.awt.geom.RectangularShape.getCenterX()

public double getCenterX()
Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.

Returns:
the x coordinate of the framing rectangle of the Shape object's center.

getCenterY sample code for java.awt.geom.RectangularShape.getCenterY() definition code for java.awt.geom.RectangularShape.getCenterY()

public double getCenterY()
Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.

Returns:
the y coordinate of the framing rectangle of the Shape object's center.

getFrame sample code for java.awt.geom.RectangularShape.getFrame() definition code for java.awt.geom.RectangularShape.getFrame()

public Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D  getFrame()
Returns the framing Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D that defines the overall shape of this object.

Returns:
a Rectangle2D, specified in double coordinates.
See Also:
setFrame(double, double, double, double) sample code for java.awt.geom.RectangularShape.setFrame(double, double, double, double) definition code for java.awt.geom.RectangularShape.setFrame(double, double, double, double) , setFrame(Point2D, Dimension2D) sample code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Point2D, java.awt.geom.Dimension2D) definition code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Point2D, java.awt.geom.Dimension2D) , setFrame(Rectangle2D) sample code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Rectangle2D) definition code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Rectangle2D)

isEmpty sample code for java.awt.geom.RectangularShape.isEmpty() definition code for java.awt.geom.RectangularShape.isEmpty()

public abstract boolean isEmpty()
Determines whether the RectangularShape is empty. When the RectangularShape is empty, it encloses no area.

Returns:
true if the RectangularShape is empty; false otherwise.

setFrame sample code for java.awt.geom.RectangularShape.setFrame(double, double, double, double) definition code for java.awt.geom.RectangularShape.setFrame(double, double, double, double)

public abstract void setFrame(double x,
                              double y,
                              double w,
                              double h)
Sets the location and size of the framing rectangle of this Shape to the specified rectangular values. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
x, y - the coordinates of the upper-left corner of the specified rectangular shape
w - the width of the specified rectangular shape
h - the height of the specified rectangular shape
See Also:
getFrame() sample code for java.awt.geom.RectangularShape.getFrame() definition code for java.awt.geom.RectangularShape.getFrame()

setFrame sample code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Point2D, java.awt.geom.Dimension2D) definition code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Point2D, java.awt.geom.Dimension2D)

public void setFrame(Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  loc,
                     Dimension2D sample code for java.awt.geom.Dimension2D definition code for java.awt.geom.Dimension2D  size)
Sets the location and size of the framing rectangle of this Shape to the specified Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D and Dimension2D sample code for java.awt.geom.Dimension2D definition code for java.awt.geom.Dimension2D , respectively. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
loc - the specified Point2D
size - the specified Dimension2D
See Also:
getFrame() sample code for java.awt.geom.RectangularShape.getFrame() definition code for java.awt.geom.RectangularShape.getFrame()

setFrame sample code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Rectangle2D) definition code for java.awt.geom.RectangularShape.setFrame(java.awt.geom.Rectangle2D)

public void setFrame(Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D  r)
Sets the framing rectangle of this Shape to be the specified Rectangle2D. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
r - the specified Rectangle2D
See Also:
getFrame() sample code for java.awt.geom.RectangularShape.getFrame() definition code for java.awt.geom.RectangularShape.getFrame()

setFrameFromDiagonal sample code for java.awt.geom.RectangularShape.setFrameFromDiagonal(double, double, double, double) definition code for java.awt.geom.RectangularShape.setFrameFromDiagonal(double, double, double, double)

public void setFrameFromDiagonal(double x1,
                                 double y1,
                                 double x2,
                                 double y2)
Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
x1, y1 - the first specified coordinates
x2, y2 - the second specified coordinates

setFrameFromDiagonal sample code for java.awt.geom.RectangularShape.setFrameFromDiagonal(java.awt.geom.Point2D, java.awt.geom.Point2D) definition code for java.awt.geom.RectangularShape.setFrameFromDiagonal(java.awt.geom.Point2D, java.awt.geom.Point2D)

public void setFrameFromDiagonal(Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  p1,
                                 Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  p2)
Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
p1, p2 - the two specified Point2D objects

setFrameFromCenter sample code for java.awt.geom.RectangularShape.setFrameFromCenter(double, double, double, double) definition code for java.awt.geom.RectangularShape.setFrameFromCenter(double, double, double, double)

public void setFrameFromCenter(double centerX,
                               double centerY,
                               double cornerX,
                               double cornerY)
Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
centerX, centerY - the center point coordinates
cornerX, cornerY - the corner point coordinates

setFrameFromCenter sample code for java.awt.geom.RectangularShape.setFrameFromCenter(java.awt.geom.Point2D, java.awt.geom.Point2D) definition code for java.awt.geom.RectangularShape.setFrameFromCenter(java.awt.geom.Point2D, java.awt.geom.Point2D)

public void setFrameFromCenter(Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  center,
                               Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  corner)
Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
center - the specified center Point2D
corner - the specified corner Point2D

contains sample code for java.awt.geom.RectangularShape.contains(java.awt.geom.Point2D) definition code for java.awt.geom.RectangularShape.contains(java.awt.geom.Point2D)

public boolean contains(Point2D sample code for java.awt.geom.Point2D definition code for java.awt.geom.Point2D  p)
Tests if a specified Point2D is inside the boundary of the Shape.

Specified by:
contains sample code for java.awt.Shape.contains(java.awt.geom.Point2D) definition code for java.awt.Shape.contains(java.awt.geom.Point2D) in interface Shape sample code for java.awt.Shape definition code for java.awt.Shape
Parameters:
p - the specified Point2D
Returns:
true if the Point2D is inside the Shape object's boundary; false otherwise.

intersects sample code for java.awt.geom.RectangularShape.intersects(java.awt.geom.Rectangle2D) definition code for java.awt.geom.RectangularShape.intersects(java.awt.geom.Rectangle2D)

public boolean intersects(Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D  r)
Tests if the interior of theShape intersects the interior of a specified Rectangle2D.

Specified by:
intersects sample code for java.awt.Shape.intersects(java.awt.geom.Rectangle2D) definition code for java.awt.Shape.intersects(java.awt.geom.Rectangle2D) in interface Shape sample code for java.awt.Shape definition code for java.awt.Shape
Parameters:
r - the specified Rectangle2D
Returns:
true if the Shape and the specified Rectangle2D intersect each other; false otherwise.
See Also:
Shape.intersects(double, double, double, double) sample code for java.awt.Shape.intersects(double, double, double, double) definition code for java.awt.Shape.intersects(double, double, double, double)

contains sample code for java.awt.geom.RectangularShape.contains(java.awt.geom.Rectangle2D) definition code for java.awt.geom.RectangularShape.contains(java.awt.geom.Rectangle2D)

public boolean contains(Rectangle2D sample code for java.awt.geom.Rectangle2D definition code for java.awt.geom.Rectangle2D  r)
Tests if the interior of the Shape entirely contains the specified Rectangle2D.

Specified by:
contains sample code for java.awt.Shape.contains(java.awt.geom.Rectangle2D) definition code for java.awt.Shape.contains(java.awt.geom.Rectangle2D) in interface Shape sample code for java.awt.Shape definition code for java.awt.Shape
Parameters:
r - the specified Rectangle2D
Returns:
true if the Shape entirely contains the specified Rectangle2D; false otherwise.
See Also:
Shape.contains(double, double, double, double) sample code for java.awt.Shape.contains(double, double, double, double) definition code for java.awt.Shape.contains(double, double, double, double)

getBounds sample code for java.awt.geom.RectangularShape.getBounds() definition code for java.awt.geom.RectangularShape.getBounds()

public Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  getBounds()
Returns the bounding box of the Shape.

Specified by:
getBounds sample code for java.awt.Shape.getBounds() definition code for java.awt.Shape.getBounds() in interface Shape sample code for java.awt.Shape definition code for java.awt.Shape
Returns:
a Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle object that bounds the Shape.
See Also:
Shape.getBounds2D() sample code for java.awt.Shape.getBounds2D() definition code for java.awt.Shape.getBounds2D()

getPathIterator sample code for java.awt.geom.RectangularShape.getPathIterator(java.awt.geom.AffineTransform, double) definition code for java.awt.geom.RectangularShape.getPathIterator(java.awt.geom.AffineTransform, double)

public PathIterator sample code for java.awt.geom.PathIterator definition code for java.awt.geom.PathIterator  getPathIterator(AffineTransform sample code for java.awt.geom.AffineTransform definition code for java.awt.geom.AffineTransform  at,
                                    double flatness)
Returns an iterator object that iterates along the Shape object's boundary and provides access to a flattened view of the outline of the Shape object's geometry.

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 the maximum distance that any point on the unflattened transformed curve can deviate from the returned flattened path segments. An optional AffineTransform sample code for java.awt.geom.AffineTransform definition code for java.awt.geom.AffineTransform can be specified so that the coordinates returned in the iteration are transformed accordingly.

Specified by:
getPathIterator sample code for java.awt.Shape.getPathIterator(java.awt.geom.AffineTransform, double) definition code for java.awt.Shape.getPathIterator(java.awt.geom.AffineTransform, double) in interface Shape sample code for java.awt.Shape definition code for java.awt.Shape
Parameters:
at - an optional AffineTransform to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired.
flatness - the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve
Returns:
a PathIterator object that provides access to the Shape object's flattened geometry.

clone sample code for java.awt.geom.RectangularShape.clone() definition code for java.awt.geom.RectangularShape.clone()

public Object sample code for java.lang.Object definition code for java.lang.Object  clone()
Creates a new object of the same class and with the same contents as this object.

Overrides:
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a clone of this instance.
Throws:
OutOfMemoryError sample code for java.lang.OutOfMemoryError definition code for java.lang.OutOfMemoryError - if there is not enough memory.
Since:
1.2
See Also:
Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable