diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-01-06 22:21:59 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-01-06 22:21:59 -0800 |
commit | 66ec611d1439affebd031b4e2f0d6a718b19c976 (patch) | |
tree | 0ca25cbcc0069d88ab68109c49cb850430244ca4 | |
parent | dcbe8fe126580129c198b410a537c89ac5c2f480 (diff) | |
parent | b559313061bb42e5603bbf0e2e2de9399b2642c8 (diff) | |
download | android_packages_apps_Snap-66ec611d1439affebd031b4e2f0d6a718b19c976.tar.gz android_packages_apps_Snap-66ec611d1439affebd031b4e2f0d6a718b19c976.tar.bz2 android_packages_apps_Snap-66ec611d1439affebd031b4e2f0d6a718b19c976.zip |
Merge "Camera: Draw mouth indicator based on display orientation"
-rw-r--r-- | src/com/android/camera/ui/FaceView.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/com/android/camera/ui/FaceView.java b/src/com/android/camera/ui/FaceView.java index 6181937ee..8013520a9 100644 --- a/src/com/android/camera/ui/FaceView.java +++ b/src/com/android/camera/ui/FaceView.java @@ -347,11 +347,18 @@ public class FaceView extends View Log.e(TAG, "smile: " + face.getSmileDegree() + "," + face.getSmileScore()); if (face.getSmileDegree() < smile_threashold_no_smile) { - - point[0] = face.mouth.x - delta_x; - point[1] = face.mouth.y; - point[2] = face.mouth.x + delta_x ; - point[3] = face.mouth.y; + if ((mDisplayOrientation == 90) || + (mDisplayOrientation == 270)) { + point[0] = face.mouth.x; + point[1] = face.mouth.y - delta_y + dy; + point[2] = face.mouth.x; + point[3] = face.mouth.y + delta_y + dy; + } else { + point[0] = face.mouth.x + dx - delta_x; + point[1] = face.mouth.y; + point[2] = face.mouth.x + dx + delta_x ; + point[3] = face.mouth.y; + } Matrix faceMatrix = new Matrix(mMatrix); faceMatrix.preRotate(face.getRollDirection(), face.mouth.x, face.mouth.y); |