Package processing.opengl
Class LineStroker
java.lang.Object
processing.opengl.LineStroker
-
Constructor Summary
ConstructorDescriptionEmpty constructor.LineStroker
(LineStroker output, int lineWidth, int capStyle, int joinStyle, int miterLimit, PMatrix2D transform) Constructs aLineStroker
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 outputLineStroker
of thisLineStroker
.void
setParameters
(int lineWidth, int capStyle, int joinStyle, int miterLimit, PMatrix2D transform) Sets the parameters of thisLineStroker
.
-
Constructor Details
-
LineStroker
public LineStroker()Empty constructor.setOutput
andsetParameters
must be called prior to calling any other methods. -
LineStroker
public LineStroker(LineStroker output, int lineWidth, int capStyle, int joinStyle, int miterLimit, PMatrix2D transform) Constructs aLineStroker
.- Parameters:
output
- an outputLineStroker
.lineWidth
- the desired line width in pixels, in S15.16 format.capStyle
- the desired end cap style, one ofCAP_BUTT
,CAP_ROUND
orCAP_SQUARE
.joinStyle
- the desired line join style, one ofJOIN_MITER
,JOIN_ROUND
orJOIN_BEVEL
.miterLimit
- the desired miter limit, in S15.16 format.transform
- aTransform4
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.
-
-
Method Details
-
setOutput
Sets the outputLineStroker
of thisLineStroker
.- Parameters:
output
- an outputLineStroker
.
-
setParameters
public void setParameters(int lineWidth, int capStyle, int joinStyle, int miterLimit, PMatrix2D transform) Sets the parameters of thisLineStroker
.- Parameters:
lineWidth
- the desired line width in pixels, in S15.16 format.capStyle
- the desired end cap style, one ofCAP_BUTT
,CAP_ROUND
orCAP_SQUARE
.joinStyle
- the desired line join style, one ofJOIN_MITER
,JOIN_ROUND
orJOIN_BEVEL
.miterLimit
- the desired miter limit, in S15.16 format.transform
- aTransform4
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.
-
moveTo
public void moveTo(int x0, int y0, int c0) -
lineJoin
public void lineJoin() -
lineTo
public void lineTo(int x1, int y1, int c1) -
close
public void close() -
end
public void end()
-