Skip to content

Instantly share code, notes, and snippets.

@AndriyBas
Created November 9, 2016 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndriyBas/3e8cecd1a7b9ea95be7fec341d347afa to your computer and use it in GitHub Desktop.
Save AndriyBas/3e8cecd1a7b9ea95be7fec341d347afa to your computer and use it in GitHub Desktop.
boolean onRotate(RotateGestureDetector detector) {
// ...
rotationInDegrees -= detector.getRotationDegreesDelta();
}
boolean onScale(ScaleGestureDetector detector) {
// ...
scale += (detector.getScaleFactor() - 1.0F);
}
boolean onMove(MoveGestureDetector detector) {
// ...
x += moveDetector.getFocusDelta().x / canvasWidth;
y += moveDetector.getFocusDelta().y / canvasHeight;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment