java.awt

Interface Stroke

public interface Stroke

This interface allows a Graphics2D to grab the outline of a shape, as if stroked by a marking pen of appropriate size and shape. The area inked by the pen is the area of this stroke. Anything in the graphic which traces an outline will use this stroke, such as drawLine. Strokes must be immutable, because the graphics object does not clone them.

Since: 1.1

See Also: BasicStroke setStroke

UNKNOWN: updated to 1.4

Method Summary
ShapecreateStrokedShape(Shape s)
Returns a shape which outlines the boundary of the given shape, in effect converting the infinitely thin line into a new shape.

Method Detail

createStrokedShape

public Shape createStrokedShape(Shape s)
Returns a shape which outlines the boundary of the given shape, in effect converting the infinitely thin line into a new shape.

Parameters: s the shape to stroke

Returns: the stroked outline shape