public class LineStroker
extends java.lang.Object
Constructor and Description |
---|
LineStroker()
Empty constructor.
|
LineStroker(LineStroker output,
int lineWidth,
int capStyle,
int joinStyle,
int miterLimit,
PMatrix2D transform)
Constructs a
LineStroker . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
end() |
void |
lineJoin() |
void |
lineTo(int x1,
int y1,
int c1) |
void |
moveTo(int x0,
int y0,
int c0) |
void |
setOutput(LineStroker output)
Sets the output
LineStroker of this LineStroker . |
void |
setParameters(int lineWidth,
int capStyle,
int joinStyle,
int miterLimit,
PMatrix2D transform)
Sets the parameters of this
LineStroker . |
public LineStroker()
setOutput
and setParameters
must be called prior to calling any other methods.public LineStroker(LineStroker output, int lineWidth, int capStyle, int joinStyle, int miterLimit, PMatrix2D transform)
LineStroker
.output
- an output LineStroker
.lineWidth
- the desired line width in pixels, in S15.16 format.capStyle
- the desired end cap style, one of CAP_BUTT
,
CAP_ROUND
or CAP_SQUARE
.joinStyle
- the desired line join style, one of JOIN_MITER
,
JOIN_ROUND
or JOIN_BEVEL
.miterLimit
- the desired miter limit, in S15.16 format.transform
- a Transform4
object indicating the transform that has
been previously applied to all incoming coordinates. This is
required in order to produce consistently shaped end caps and
joins.public void setOutput(LineStroker output)
LineStroker
of this LineStroker
.output
- an output LineStroker
.public void setParameters(int lineWidth, int capStyle, int joinStyle, int miterLimit, PMatrix2D transform)
LineStroker
.lineWidth
- the desired line width in pixels, in S15.16 format.capStyle
- the desired end cap style, one of CAP_BUTT
,
CAP_ROUND
or CAP_SQUARE
.joinStyle
- the desired line join style, one of JOIN_MITER
,
JOIN_ROUND
or JOIN_BEVEL
.miterLimit
- the desired miter limit, in S15.16 format.transform
- a Transform4
object indicating the transform that has
been previously applied to all incoming coordinates. This is
required in order to produce consistently shaped end caps and
joins.public void moveTo(int x0, int y0, int c0)
public void lineJoin()
public void lineTo(int x1, int y1, int c1)
public void close()
public void end()