FileDocCategorySizeDatePackage
PathSink.javaAPI DocphoneME MR2 API (J2ME)3237Wed May 02 18:00:36 BST 2007com.sun.pisces

PathSink

public abstract class PathSink extends LineSink
The LineSink interface extends the PathSink interface, and additionally accepts curve drawing commands: quadTo and curveTo.

Fields Summary
Constructors Summary
Methods Summary
public abstract voidcubicTo(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).

param
x1 the X coordinate of the first control point in S15.16 format
param
y1 the Y coordinate of the first control point in S15.16 format
param
x2 the X coordinate of the second control point in S15.16 format
param
y2 the Y coordinate of the second control point in S15.16 format
param
x3 the final X coordinate in S15.16 format
param
y3 the final Y coordinate in S15.16 format

public abstract voidquadTo(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).

param
x1 the X coordinate of the control point in S15.16 format
param
y1 the Y coordinate of the control point in S15.16 format
param
x2 the final X coordinate in S15.16 format
param
y2 the final Y coordinate in S15.16 format