¡@

Home 

2014/10/16 ¤W¤È 08:20:22

android Programming Glossary: newrot

rotation and scaling using multi touch in android

http://stackoverflow.com/questions/8515709/rotation-and-scaling-using-multi-touch-in-android

touch events here... double r Math.atan2 event.getX 400 2 400 2 event.getY int rotation int Math.toDegrees r float newRot new Float rotation switch event.getAction MotionEvent.ACTION_MASK case MotionEvent.ACTION_DOWN savedMatrix.set matrix start.set.. android android imageview android gesture share improve this question float lastEvent null float d 0f float newRot 0f @Override public boolean onTouch View v MotionEvent event ImageView view ImageView v Dump touch event to log dumpEvent.. savedMatrix if newDist 10f float scale newDist oldDist matrix.postScale scale scale mid.x mid.y if lastEvent null newRot rotation event if Constant.TRACE Log.d Degreeeeeeeeeee newRot newRot float r newRot d matrix.postRotate r imgView.getMeasuredWidth..