java.lang.Object | ||
↳ | sun.java2d.pisces.LineSink | |
↳ | sun.java2d.pisces.Dasher |
The 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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Empty constructor.
| |||||||||||
Constructs a
Dasher . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Closes the current path by drawing a line from the current
drawing position to the point specified by the moset recent
moveTo command. | |||||||||||
Ends the current path.
| |||||||||||
Provides a hint that the current segment should be joined to
the following segment using an explicit miter or round join if
required.
| |||||||||||
Draws a line from the current drawing position to the point
(x1, y1) and sets the current drawing position to
(x1, y1) . | |||||||||||
Moves the current drawing position to the point
(x0,
y0) . | |||||||||||
Sets the output
LineSink of this
Dasher . | |||||||||||
Sets the parameters of this
Dasher . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Empty constructor. setOutput
and
setParameters
must be called prior to calling any
other methods.
Constructs a Dasher
.
output | an output LineSink . |
---|---|
dash | an array of int s containing the dash
pattern in S15.16 format. |
phase | an int containing the dash phase 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 compute dash lengths
properly.
|
Closes the current path by drawing a line from the current
drawing position to the point specified by the moset recent
moveTo
command.
Ends the current path. It may be necessary to end a path in order to allow end caps to be drawn.
Provides a hint that the current segment should be joined to the following segment using an explicit miter or round join if required.
An application-generated path will generally have no need
to contain calls to this method; they are typically introduced
by a Flattener
to mark segment divisions that
appear in its input, and consumed by a Stroker
that is responsible for emitting the miter or round join
segments.
Other LineSink
classes should simply pass this
hint to their output sink as needed.
Draws a line from the current drawing position to the point
(x1, y1)
and sets the current drawing position to
(x1, y1)
.
x1 | the X coordinate in S15.16 format |
---|---|
y1 | the Y coordinate in S15.16 format |
Moves the current drawing position to the point (x0,
y0)
.
x0 | the X coordinate in S15.16 format |
---|---|
y0 | the Y coordinate in S15.16 format |
Sets the output LineSink
of this
Dasher
.
output | an output LineSink .
|
---|
Sets the parameters of this Dasher
.
dash | an array of int s containing the dash
pattern in S15.16 format. |
---|---|
phase | an int containing the dash phase 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 compute dash lengths
properly.
|