绘制连接三点的完美曲线

我想绘制一条曲线连接我的屏幕上的三个点
PointA =(480,46)PointB =(160,137)PointC =(0,228)

如何使用Android API绘制曲线?
请帮忙..

谢谢,

Solutions Collecting From Web of "绘制连接三点的完美曲线"

无论我想要什么,我都可以通过使用下面的代码来生成它:

protected void onDraw(Canvas canvas) { super.onDraw(canvas); PointF mPoint1 = new PointF(w/1.2F, h/1.2F); PointF mPoint2 = new PointF(w/24, h/1.2F); Path myPath1 = new Path(); Paint paint = new Paint(); paint.setAntiAlias(true); paint.setStyle(Style.STROKE); paint.setStrokeWidth(2); paint.setColor(Color.WHITE); myPath1 = drawCurve(canvas, paint, mPoint1, mPoint2); canvas.drawPath(myPath1, paint); } private Path drawCurve(Canvas canvas, Paint paint, PointF mPointa, PointF mPointb) { Path myPath = new Path(); myPath.moveTo(63*w/64, h/10); myPath.quadTo(mPointa.x, mPointa.y, mPointb.x, mPointb.y); return myPath; } 

这将find屏幕的两侧(风景模式),并将在屏幕上绘制完美的曲线。