CONTENTS | PREV | NEXT Java 2D API



CHAPTER 3

Geometries

The classes in the java.awt.geom package define common geometric objects such as points, lines, curves, and rectangles.1 All of the Java 2D API geometries implement the Shape interface defined in java.awt. The Shape interface defines a common set of methods for describing and inspecting geometric path objects. The PathIterator interface defines a protocol for retrieving of elements from a geometry,

The java.awt.geom package provides a transform class, AffineTransform. This class represents a two-dimensional affine transform that performs a linear mapping between 2D coordinates without distorting straight and parallel lines.


3.0.1 Interfaces




Interface

Description

PathIterator

Defines methods for retrieving elements from a path.


3.0.2 Classes




Class

Description

AffineTransform

Implements: Cloneable

Represents a 2D affine transform, which performs a linear mapping from 2D coordinates to other 2D coordinates.

Arc2D

Extends: RectangularShape

Represents an arc defined by a bounding rectangle, start angle, angular extent, and a closure type.

Arc2D.Float

Extends: Arc2D

An arc specified in float precision.

Area

Implements: Shape, Cloneable

Represents an area geometry that supports boolean operations.

CubicCurve2D

Implements: Shape

Represents a cubic parametric curve segment in (x,y) coordinate space.

CubicCurve2D.Float

Extends: CubicCurve2D

A cubic parametric curve segment specified in float precision.

Dimension2D

Encapsulates a width and height dimension. Abstract superclass for all objects that store a 2D dimension.

Ellipse2D

Extends: RectangularShape

Represents an ellipse defined by a bounding rectangle.

Ellipse2D.Float

Extends: Ellipse2D

An ellipse specified in float precision.

GeneralPath

Implements: Shape

Represents a geometric path constructed from lines and quadratic and cubic curves.

Line2D

Implements: Shape

Represents a line segment in (x, y) coordinate space.

Line2D.Float

Extends: Line2D

A line segment specified in float precision.

Point2D

A point representing a location in (x,y) coordinate space.

Point2D.Double

Extends: Point2D

A point representing a location in (x,y) coordinate space (double precision).

Point2D.Float

Extends: Point2D

A point representing a location in (x,y) coordinate space (float precision).

QuadCurve2D

Implements: Shape

Represents a quadratic parametric curve segment in (x, y) coordinate space.

QuadCurve2D.Double

Extends: QuadCurve2D

A quadratic parametric curve segment specified with double coordinates.

QuadCurve2D.Float

Extends: QuadCurve2D

A quadratic parametric curve segment specified with float coordinates.

Rectangle2D

Extends: RectangularShape

Represents a rectangle defined by a location (x, y) and dimension (w x h).

Rectangle2D.Double

Extends: Rectangle2D

A rectangle specified in double coordinates.

Rectangle2D.Float

Extends: Rectangle2D

A rectangle specified in float coordinates.

RectangularShape

Implements: Shape

Provides common manipulation routines for operating on shapes that have rectangular bounds.

RoundRectangle2D

Extends: RectangularShape

Represents a rectangle with rounded corners defined by a location (x, y), a dimension (w x h), and the width and height of the corner arc.

RoundRectangle2D.Float

Extends: RoundRectangle2D

A rounded rectangle specified in float coordinates.



CONTENTS | PREV | NEXT
Copyright © 1997-1998 Sun Microsystems, Inc. All Rights Reserved.