过控制点的曲线

// xt, yt is the point you want to draw through

// x0, y0 and x2, y2 are the end points of the curve

x1 = xt * 2 – (x0 + x2) / 2;

y1 = yt * 2 – (y0 + y2) / 2;

moveTo(x0, y0);

curveTo(x1, y1, x2, y2);

posted @ 2012-08-20 22:21  skybdemq  阅读(176)  评论(0编辑  收藏  举报