JSR-62 (Final)

java.awt
Interface Shape

All Known Implementing Classes:
Polygon, Rectangle

public interface Shape

The Shape interface provides definitions for objects that represent some form of geometric shape.

Definition of insideness: A point is considered to lie inside a Shape if and only if:


Method Summary
 Rectangle getBounds()
          Returns an integer Rectangle that completely encloses the Shape.
 

Method Detail

getBounds

public Rectangle getBounds()
Returns an integer Rectangle that completely encloses the Shape. Note that there is no guarantee that the returned Rectangle is the smallest bounding box that encloses the Shape, only that the Shape lies entirely within the indicated Rectangle. The returned Rectangle might also fail to completely enclose the Shape if the Shape overflows the limited range of the integer data type.

Returns:
an integer Rectangle that completely encloses the Shape.

JSR-62 (Final)

Java and Java 2D are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Copyright 1993 - 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A. All Rights Reserved.
Use of this specification is subject to this license.