by, 03-04-2012 at 04:36 PM (613 Views)
Following set of the standard shapes are provided by the Java 2D API.
To define geometric primitives, package java.awt.geom is considered to be the important one. By integration as well as the combination of straight geometric primitives, you can present arbitrary shapes.
Shape interface which consists of an outline & interior, presents the geometric shape. These set of methods are provided by this interface.
- Methods to describe 2D geometric objects.
- Methods to inspect 2D geometric objects.
- Supports multiple sub shapes & curved line segments.
Curve segments are supported by the shape interface in comparison with the graphic class. Graphic class just provides support to the straight line segments.