Package org.ka2ddo.yaac.gui
Class RailroadStroke
java.lang.Object
org.ka2ddo.yaac.gui.RailroadStroke
- All Implemented Interfaces:
Stroke
This class defines a solid Stroke which alternates widths of the line between a narrow
width (the "rail") and a wide width (the "tie"). The rail width, tie width,
and tie spacing are all configurable parameters.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns an outlineShape
which encloses the area that should be painted when theShape
is stroked according to the rules defined by the object implementing theStroke
interface.
-
Constructor Details
-
RailroadStroke
public RailroadStroke(float railWidth, float tieWidth, float tieSpacing)
-
-
Method Details
-
createStrokedShape
Returns an outlineShape
which encloses the area that should be painted when theShape
is stroked according to the rules defined by the object implementing theStroke
interface.- Specified by:
createStrokedShape
in interfaceStroke
- Parameters:
p
- aShape
to be stroked- Returns:
- the stroked outline
Shape
.
-