Guest User

Untitled

a guest
Jul 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. case "LINE":
  2. {
  3. switch (eve.getAction())
  4. {
  5. case MotionEvent.ACTION_DOWN:
  6. case MotionEvent.ACTION_MOVE:
  7. {
  8. if(eve.getAction() == MotionEvent.ACTION_DOWN)
  9. {
  10. x1 = x2 = X;
  11. y1 = y2 = Y;
  12. }
  13. else
  14. {
  15. x2 = X;
  16. y2 = Y;
  17. }
  18.  
  19. pth.reset();
  20. pth.moveTo(x1, y1);
  21. pth.lineTo(x2, y2);
  22.  
  23. c_tmp = SH.lockCanvas();
  24. c_tmp.drawARGB(a,r,g,b);
  25. c_tmp.drawBitmap(b_main, 0,0, null);
  26. c_tmp.drawPath(pth, p_sten);
  27. SH.unlockCanvasAndPost(c_tmp);
  28. }
  29. break;
  30.  
  31.  
  32. case MotionEvent.ACTION_UP:
  33. {
  34.  
  35. c_main.drawPath(pth_tmp, p_main);
  36. nextBit();
  37.  
  38. c_tmp = SH.lockCanvas();
  39. c_tmp.drawARGB(a,r,g,b);
  40. c_tmp.drawBitmap(b_main, 0,0, null);
  41. SH.unlockCanvasAndPost(c_tmp);
  42. }
  43. break;
  44. }
  45. }
  46. break;
Add Comment
Please, Sign In to add comment