Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[camera] Clockwise rotation of focus point in android #3458

Merged
merged 2 commits into from
Feb 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.0+3

* Clockwise rotation of focus point in android

## 0.7.0+2

* Fix example reference in README.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ public void setExposurePoint(@NonNull final Result result, Double x, Double y)
}
// Set the metering rectangle
if (x == null || y == null) cameraRegions.resetAutoExposureMeteringRectangle();
else cameraRegions.setAutoExposureMeteringRectangleFromPoint(x, y);
else cameraRegions.setAutoExposureMeteringRectangleFromPoint(y, 1 - x);
// Apply it
updateExposure(exposureMode);
refreshPreviewCaptureSession(
Expand Down Expand Up @@ -838,7 +838,7 @@ public void setFocusPoint(@NonNull final Result result, Double x, Double y)
if (x == null || y == null) {
cameraRegions.resetAutoFocusMeteringRectangle();
} else {
cameraRegions.setAutoFocusMeteringRectangleFromPoint(x, y);
cameraRegions.setAutoFocusMeteringRectangleFromPoint(y, 1 - x);
}

// Apply the new metering rectangle
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera
description: A Flutter plugin for getting information about and controlling the
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
and streaming image buffers to dart.
version: 0.7.0+2
version: 0.7.0+3
homepage: https://github.com/flutter/plugins/tree/master/packages/camera/camera

dependencies:
Expand Down