diva.sketch
Class PenStroke
java.lang.Object
java.awt.BasicStroke
diva.sketch.PenStroke
- All Implemented Interfaces:
- Stroke
public class PenStroke
- extends BasicStroke
- implements Stroke
A first cut at making pen-sketched drawings look
like they were actually sketched by a pen. This
class special-cases Polyline2D objects and hands
everything else off to its superclass.
- Version:
- $Revision: 1.4 $
- Author:
- Michael Shilman (michaels@eecs.berkeley.edu)
Constructor Summary |
PenStroke(float width)
Constructs a solid BasicStroke with the specified
line width and with default values for the cap and join
styles. |
PenStroke
public PenStroke(float width)
- Constructs a solid
BasicStroke
with the specified
line width and with default values for the cap and join
styles.
- Parameters:
width
- the width of the BasicStroke
- Throws:
IllegalArgumentException
- if width
is negative
createStrokedShape
public final Shape createStrokedShape(Shape s)
- Returns a
Shape
whose interior defines the
stroked outline of a specified Shape
.
- Specified by:
createStrokedShape
in interface Stroke
- Overrides:
createStrokedShape
in class BasicStroke
- Parameters:
s
- the Shape
boundary be stroked
- Returns:
- the
Shape
of the stroked outline.
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.