Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case "LINE":
- {
- switch (eve.getAction())
- {
- case MotionEvent.ACTION_DOWN:
- case MotionEvent.ACTION_MOVE:
- {
- if(eve.getAction() == MotionEvent.ACTION_DOWN)
- {
- x1 = x2 = X;
- y1 = y2 = Y;
- }
- else
- {
- x2 = X;
- y2 = Y;
- }
- pth.reset();
- pth.moveTo(x1, y1);
- pth.lineTo(x2, y2);
- c_tmp = SH.lockCanvas();
- c_tmp.drawARGB(a,r,g,b);
- c_tmp.drawBitmap(b_main, 0,0, null);
- c_tmp.drawPath(pth, p_sten);
- SH.unlockCanvasAndPost(c_tmp);
- }
- break;
- case MotionEvent.ACTION_UP:
- {
- c_main.drawPath(pth_tmp, p_main);
- nextBit();
- c_tmp = SH.lockCanvas();
- c_tmp.drawARGB(a,r,g,b);
- c_tmp.drawBitmap(b_main, 0,0, null);
- SH.unlockCanvasAndPost(c_tmp);
- }
- break;
- }
- }
- break;
Add Comment
Please, Sign In to add comment