PathSinkpublic abstract class PathSink extends LineSink The LineSink interface extends the
PathSink interface, and additionally accepts curve
drawing commands: quadTo and curveTo . |
Methods Summary |
---|
public abstract void | cubicTo(int x1, int y1, int x2, int y2, int x3, int y3)Draws a cubic Bezier curve starting at the current drawing
position and ending at the point (x3, y3)
according to the formulas:
x(t) = (1 - t)^3*x0 + 3*(1 - t)^2*t*x1 + 3*(1 - t)*t^2*x2 + t^3*x3
y(t) = (1 - t)^3*y0 + 3*(1 - t)^2*t*y1 + 3*(1 - t)*t^2*y2 + t^3*x3
0 <= t <= 1
where (x0, y0) is the current drawing position.
Finally, the current drawing position is set to (x3,
y3) .
| public abstract void | quadTo(int x1, int y1, int x2, int y2)Draws a quadratic Bezier curve starting at the current drawing
position and ending at the point (x2, y2)
according to the formulas:
x(t) = (1 - t)^2*x0 + 2*(1 - t)*t*x1 + t^2*x2
y(t) = (1 - t)^2*y0 + 2*(1 - t)*t*y1 + t^2*x2
0 <= t <= 1
where (x0, y0) is the current drawing position.
Finally, the current drawing position is set to (x2,
y2) .
|
|