文件名称:贝塞尔曲线
文件大小:26.29MB
文件格式:RAR
更新时间:2020-10-15 07:59:25
贝塞尔曲线
从2阶到7阶的贝赛尔曲线
private static final int MAX_COUNT = 7; // 贝塞尔曲线最大阶数
private static final int REGION_WIDTH = 30; // 合法区域宽度
private static final int FINGER_RECT_SIZE = 60; // 矩形尺寸
private static final int BEZIER_WIDTH = 10; // 贝塞尔曲线线宽
private static final int TANGENT_WIDTH = 6; // 切线线宽
private static final int CONTROL_WIDTH = 12; // 控制点连线线宽
private static final int CONTROL_RADIUS = 12; // 控制点半径
private static final int TEXT_SIZE = 40; // 文字画笔尺寸
private static final int TEXT_HEIGHT = 60; // 文本高度
private static final int RATE = 10; // 移动速率
private static final int HANDLER_WHAT = 100;
private static final int FRAME = 1000; // 1000帧
private static final String[] TANGENT_COLORS = {"#7fff00", "#7a67ee", "#ee82ee", "#ffd700", "#1c86ee",
"#8b8b00"}; // 切线颜色
private static final int STATE_READY = 0x0001;
private static final int STATE_RUNNING = 0x0002;
private static final int STATE_STOP = 0x0004;
private static final int STATE_TOUCH = 0x0010;
private Path mBezierPath = null; // 贝塞尔曲线路径
private Paint mBezierPaint = null; // 贝塞尔曲线画笔
private Paint mMovingPaint = null; // 移动点画笔
private Paint mControlPaint = null; // 控制点画笔
private Paint mTangentPaint = null; // 切线画笔
private Paint mLinePaint = null; // 固定线画笔
private Paint mTextPointPaint = null; // 点画笔
private Paint mTextPaint = null; // 文字画笔
private ArrayList