public final class Dasher extends Object implements PathConsumer2D
Dasher
class takes a series of linear commands
(moveTo
, lineTo
, close
and
end
) and breaks them into smaller segments according to a
dash pattern array and a starting dash phase.
Issues: in J2Se, a zero length dash segment as drawn as a very short dash, whereas Pisces does not draw anything. The PostScript semantics are unclear.
Constructor and Description |
---|
Dasher(PathConsumer2D out) |
Dasher(PathConsumer2D out,
float[] dash,
float phase)
Constructs a
Dasher . |
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[] dash,
float phase) |
public Dasher(PathConsumer2D out, float[] dash, float phase)
Dasher
.out
- an output PathConsumer2D
.dash
- an array of float
s containing the dash patternphase
- a float
containing the dash phasepublic Dasher(PathConsumer2D out)
public void reset(float[] dash, float phase)
public void moveTo(float x0, float y0)
moveTo
in interface PathConsumer2D
public void lineTo(float x1, float y1)
lineTo
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
public void closePath()
closePath
in interface PathConsumer2D
public void pathDone()
pathDone
in interface PathConsumer2D
Copyright © 2020. All rights reserved.