Skip to content

Commit aa827e3

Browse files
authored
[camera] Clockwise rotation of focus point in android (flutter#3458)
1 parent 654a025 commit aa827e3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/camera/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.7.0+3
2+
3+
* Clockwise rotation of focus point in android
4+
15
## 0.7.0+2
26

37
* Fix example reference in README.

packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ public void setExposurePoint(@NonNull final Result result, Double x, Double y)
786786
}
787787
// Set the metering rectangle
788788
if (x == null || y == null) cameraRegions.resetAutoExposureMeteringRectangle();
789-
else cameraRegions.setAutoExposureMeteringRectangleFromPoint(x, y);
789+
else cameraRegions.setAutoExposureMeteringRectangleFromPoint(y, 1 - x);
790790
// Apply it
791791
updateExposure(exposureMode);
792792
refreshPreviewCaptureSession(
@@ -838,7 +838,7 @@ public void setFocusPoint(@NonNull final Result result, Double x, Double y)
838838
if (x == null || y == null) {
839839
cameraRegions.resetAutoFocusMeteringRectangle();
840840
} else {
841-
cameraRegions.setAutoFocusMeteringRectangleFromPoint(x, y);
841+
cameraRegions.setAutoFocusMeteringRectangleFromPoint(y, 1 - x);
842842
}
843843

844844
// Apply the new metering rectangle

packages/camera/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera
22
description: A Flutter plugin for getting information about and controlling the
33
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
44
and streaming image buffers to dart.
5-
version: 0.7.0+2
5+
version: 0.7.0+3
66
homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera
77

88
dependencies:

0 commit comments

Comments
 (0)