diff options
author | Jeff Brown <jeffbrown@google.com> | 2014-02-12 00:26:19 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-12 00:26:19 +0000 |
commit | eac45b8a53e8a17b6c9a1e7bb69a8a791073c007 (patch) | |
tree | cb99204ac4117e18a3a4d1cc6bc30867713bbdf8 /libs | |
parent | 6e5fdb1551ca7d117bf7e1acca133a077a8701f0 (diff) | |
parent | ed4d28dd70448b13eb74a3166ec8d1c1a530e2d4 (diff) | |
download | frameworks_native-eac45b8a53e8a17b6c9a1e7bb69a8a791073c007.zip frameworks_native-eac45b8a53e8a17b6c9a1e7bb69a8a791073c007.tar.gz frameworks_native-eac45b8a53e8a17b6c9a1e7bb69a8a791073c007.tar.bz2 |
am ed4d28dd: Add method to apply offset to PointerCoords. (DO NOT MERGE)
* commit 'ed4d28dd70448b13eb74a3166ec8d1c1a530e2d4':
Add method to apply offset to PointerCoords. (DO NOT MERGE)
Diffstat (limited to 'libs')
-rw-r--r-- | libs/input/Input.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp index 6f53996..ccbf52b 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -213,6 +213,11 @@ void PointerCoords::scale(float scaleFactor) { scaleAxisValue(*this, AMOTION_EVENT_AXIS_TOOL_MINOR, scaleFactor); } +void PointerCoords::applyOffset(float xOffset, float yOffset) { + setAxisValue(AMOTION_EVENT_AXIS_X, getX() + xOffset); + setAxisValue(AMOTION_EVENT_AXIS_Y, getY() + yOffset); +} + #ifdef HAVE_ANDROID_OS status_t PointerCoords::readFromParcel(Parcel* parcel) { bits = parcel->readInt64(); |