Java Platform 1.2
Beta 4

Interface java.awt.Stroke

All Known Implementing Classes:
BasicStroke

public abstract interface Stroke
This interface allows a Graphics2D object to get a Path representation of the boundaries of a stroking primitive from the path to be stroked. The effect of stroking a path can be compared to drawing a logical pen of an appropriate size and shape along the trajectory of the path. The area where the pen would place ink is the area enclosed by the stroked path.

The stroking primitives of the Graphics2D interface include the drawPath method and any other methods that are implemented in terms of that method such as drawLine, drawRect, drawRoundRect, drawOval, drawArc, drawPolyline, and drawPolygon.

The objects of the classes implementing Stroke must be immutable (i.e. read-only) because the Graphics2D will not clone these objects either when they are set as an attribute with the setStroke method or when the Graphics2D object is itself cloned. If a Stroke object were modified after it was set in the state of the Graphics2D then the behavior of subsequent rendering would be undefined.

See Also:
BasicStroke, Graphics2D.setStroke(java.awt.Stroke)

Method Summary
 Shape createStrokedShape(Shape p)
          Returns a path which encloses the area that should be painted when the path is stroked according to the rules defined by the object implementing the Stroke interface.
 

Method Detail

createStrokedShape

public Shape createStrokedShape(Shape p)
Returns a path which encloses the area that should be painted when the path is stroked according to the rules defined by the object implementing the Stroke interface.
Parameters:
p - The path that should be stroked.
Returns:
The stroked path.

Java Platform 1.2
Beta 4

Submit a bug or feature
Submit comments/suggestions about new javadoc look
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.
This documentation was generated with a post-Beta4 version of Javadoc.