public final class Stroker extends Object implements PathConsumer2D
Modifier and Type | Field and Description |
---|---|
static int |
CAP_BUTT
Constant value for end cap style.
|
static int |
CAP_ROUND
Constant value for end cap style.
|
static int |
CAP_SQUARE
Constant value for end cap style.
|
static int |
JOIN_BEVEL
Constant value for join style.
|
static int |
JOIN_MITER
Constant value for join style.
|
static int |
JOIN_ROUND
Constant value for join style.
|
Constructor and Description |
---|
Stroker(PathConsumer2D pc2d) |
Stroker(PathConsumer2D pc2d,
float lineWidth,
int capStyle,
int joinStyle,
float miterLimit)
Constructs a
Stroker . |
Modifier and Type | Method and Description |
---|---|
void |
closePath() |
void |
curveTo(float x1,
float y1,
float x2,
float y2,
float x3,
float y3) |
void |
lineTo(float x1,
float y1) |
void |
moveTo(float x0,
float y0) |
void |
pathDone() |
void |
quadTo(float x1,
float y1,
float x2,
float y2) |
void |
reset(float lineWidth,
int capStyle,
int joinStyle,
float miterLimit) |
void |
setConsumer(PathConsumer2D pc2d) |
public static final int JOIN_MITER
public static final int JOIN_ROUND
public static final int JOIN_BEVEL
public static final int CAP_BUTT
public static final int CAP_ROUND
public static final int CAP_SQUARE
public Stroker(PathConsumer2D pc2d, float lineWidth, int capStyle, int joinStyle, float miterLimit)
Stroker
.pc2d
- an output PathConsumer2D
.lineWidth
- the desired line width in pixelscapStyle
- 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 limitpublic Stroker(PathConsumer2D pc2d)
public void setConsumer(PathConsumer2D pc2d)
public void reset(float lineWidth, int capStyle, int joinStyle, float miterLimit)
public void moveTo(float x0, float y0)
moveTo
in interface PathConsumer2D
public void lineTo(float x1, float y1)
lineTo
in interface PathConsumer2D
public void closePath()
closePath
in interface PathConsumer2D
public void pathDone()
pathDone
in interface PathConsumer2D
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
curveTo
in interface PathConsumer2D
public void quadTo(float x1, float y1, float x2, float y2)
quadTo
in interface PathConsumer2D
Copyright © 2020. All rights reserved.