org.jhotdraw.geom
Class DoubleStroke
java.lang.Object
org.jhotdraw.geom.DoubleStroke
- All Implemented Interfaces:
- java.awt.Stroke
- Direct Known Subclasses:
- GrowStroke
public class DoubleStroke
- extends java.lang.Object
- implements java.awt.Stroke
Draws a double stroke (an outline of an outline).
The inner width of a DoubleStroke defines the distance between the two
outlines being drawn. The outline width of a DoubleStroke defines the
thickness of the outline.
- Version:
- $Id: DoubleStroke.java 527 2009-06-07 14:28:19Z rawcoder $
- Author:
- Werner Randelshofer
Constructor Summary |
DoubleStroke(float innerWidth,
float outlineWidth)
|
DoubleStroke(float innerWidth,
float outlineWidth,
int cap,
int join,
float miterLimit,
float[] dashes,
float dashPhase)
|
Method Summary |
private double[] |
computeThickLine(double[] seg,
int offset,
double[] corners)
|
private double[] |
computeThickLine(double x1,
double y1,
double x2,
double y2,
double thickness,
double[] corners)
|
java.awt.Shape |
createStrokedShape(java.awt.Shape s)
|
protected void |
traceStroke(BezierPath bp,
java.awt.geom.GeneralPath left,
java.awt.geom.GeneralPath right)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
outlineStroke
private java.awt.BasicStroke outlineStroke
innerWidth
private float innerWidth
outlineWidth
private float outlineWidth
miterLimit
private double miterLimit
dashes
private float[] dashes
dashPhase
private float dashPhase
DoubleStroke
public DoubleStroke(float innerWidth,
float outlineWidth)
DoubleStroke
public DoubleStroke(float innerWidth,
float outlineWidth,
int cap,
int join,
float miterLimit,
float[] dashes,
float dashPhase)
createStrokedShape
public java.awt.Shape createStrokedShape(java.awt.Shape s)
- Specified by:
createStrokedShape
in interface java.awt.Stroke
traceStroke
protected void traceStroke(BezierPath bp,
java.awt.geom.GeneralPath left,
java.awt.geom.GeneralPath right)
computeThickLine
private double[] computeThickLine(double[] seg,
int offset,
double[] corners)
computeThickLine
private double[] computeThickLine(double x1,
double y1,
double x2,
double y2,
double thickness,
double[] corners)