rename some variables

This commit is contained in:
tibbi 2016-02-15 18:44:11 +01:00
parent e921b2bbb1
commit 717a629d09

View File

@ -12,8 +12,8 @@ import android.view.View;
public class MyCanvas extends View { public class MyCanvas extends View {
private Paint paint; private Paint paint;
private Path path; private Path path;
private float startX; private float curX;
private float startY; private float curY;
public MyCanvas(Context context, AttributeSet attrs) { public MyCanvas(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
@ -33,18 +33,18 @@ public class MyCanvas extends View {
private void actionDown(float x, float y) { private void actionDown(float x, float y) {
path.moveTo(x, y); path.moveTo(x, y);
startX = x; curX = x;
startY = y; curY = y;
} }
private void actionMove(float x, float y) { private void actionMove(float x, float y) {
path.quadTo(startX, startY, (x + startX) / 2, (y + startY) / 2); path.quadTo(curX, curY, (x + curX) / 2, (y + curY) / 2);
startX = x; curX = x;
startY = y; curY = y;
} }
private void actionUp() { private void actionUp() {
path.lineTo(startX, startY); path.lineTo(curX, curY);
} }
@Override @Override