解决方案 »
- 类似手机助手这样的软件是怎么实现对手机里的软件进行更新的。
- android 4.0移动网络不可用 android4.0 “设置--更多--移动网络”这个选项没有 3G 信号栏指示没有
- apk重新打包,相信大家都想解决这个问题
- android 定位问题!
- 闹钟使用服务(Service)来实现的吗?
- in-app billing V3测试程序疑问?
- visual studio c++ 编译adb 源码运行出现这个问题 R6030 CRT not initialized
- 怎么实现activity跟随手指左右旋转
- android canvas zxing 二维码位置
- Android Studio 出现Session ‘app’: Error Installing APKs
- 頁面跳轉
- 大家看看这是神马情况
给你个链接吧
http://stackoverflow.com/questions/9993030/bezier-curve-and-canvas
这是demo里面我设置的点形成的贝塞尔线
这是demo里面我设置的点形成的贝塞尔线
你用了几个点?
我画三个点 吧下面的代码放在onDraw 函数中
final Path path = new Path();
path.moveTo(0, 100); final float x2 = (200 + 100) / 2;
final float y2 = ( 200 + 100) / 10;
path.quadTo(x2, y2, 500, 500);
final float x3 = 220 ;
final float y3 = 23 ;
path.quadTo(x3, y3, 20, 800);
canvas.drawPath(path, paint);
}
Paint paint = new Paint() {
{
setStyle(Paint.Style.STROKE);
setStrokeCap(Paint.Cap.ROUND);
setStrokeWidth(3.0f);
setAntiAlias(true);
}
};
请参考这个实现URL