| java.lang.Object com.sun.pisces.LineSink com.sun.pisces.PathSink com.sun.pisces.Flattener
Flattener | public class Flattener extends PathSink (Code) | | The Flattener class rewrites a general path, which
may include curved segments, into one containing only linear
segments suitable for sending to a LineSink .
Curved segments specified by quadTo and
curveTo commands will be subdivided into two pieces.
When the control points of a segment lie sufficiently close
togther, such that max(x_i) - min(x_i) < flatness and
max(y_i) - min(y_i) < flatness for a user-supplied
flatness parameter, a lineTo command is
emitted between the first and last points of the curve.
|
Constructor Summary | |
public | Flattener() Empty constructor. | public | Flattener(LineSink output, int flatness) Constructs a Flattener that will rewrite any
incoming quadTo and curveTo commands
into a series of lineTo commands with maximum X
and Y extents no larger than the supplied flatness
value. |
Method Summary | |
public void | close() | public void | cubicTo(int x1, int y1, int x2, int y2, int x3, int y3) | public void | end() | public void | lineJoin() | public void | lineTo(int x1, int y1) | public void | moveTo(int x0, int y0) | public void | quadTo(int x1, int y1, int x2, int y2) | public void | setFlatness(int flatness) Sets the desired output flatness for this Flattener . | public void | setOutput(LineSink output) Sets the output LineSink of this
Flattener . |
FLATNESS_SQ_SHIFT | final public static int FLATNESS_SQ_SHIFT(Code) | | |
LG_FLATNESS | final public static int LG_FLATNESS(Code) | | |
MAX_CHORD_LENGTH_SQ | final public static long MAX_CHORD_LENGTH_SQ(Code) | | |
MIN_CHORD_LENGTH_SQ | final public static long MIN_CHORD_LENGTH_SQ(Code) | | |
flatnessflatnessSq | int flatnessflatnessSq(Code) | | |
Flattener | public Flattener()(Code) | | Empty constructor. setOutput and
setFlatness must be called prior to calling any
other methods.
|
Flattener | public Flattener(LineSink output, int flatness)(Code) | | Constructs a Flattener that will rewrite any
incoming quadTo and curveTo commands
into a series of lineTo commands with maximum X
and Y extents no larger than the supplied flatness
value. The flat segments will be sent as commands to the given
LineSink .
Parameters: output - a LineSink to which commandsshould be sent. Parameters: flatness - the maximum extent of a subdivided output linesegment, in S15.16 format. |
close | public void close()(Code) | | |
cubicTo | public void cubicTo(int x1, int y1, int x2, int y2, int x3, int y3)(Code) | | |
lineJoin | public void lineJoin()(Code) | | |
lineTo | public void lineTo(int x1, int y1)(Code) | | |
moveTo | public void moveTo(int x0, int y0)(Code) | | |
quadTo | public void quadTo(int x1, int y1, int x2, int y2)(Code) | | |
setFlatness | public void setFlatness(int flatness)(Code) | | Sets the desired output flatness for this Flattener .
Parameters: flatness - the maximum extent of a subdivided output linesegment, in S15.16 format. |
setOutput | public void setOutput(LineSink output)(Code) | | Sets the output LineSink of this
Flattener .
Parameters: output - an output LineSink . |
Methods inherited from com.sun.pisces.PathSink | abstract public void cubicTo(int x1, int y1, int x2, int y2, int x3, int y3)(Code)(Java Doc) abstract public void quadTo(int x1, int y1, int x2, int y2)(Code)(Java Doc)
|
|
|