react-native-rectangle-doc-scanner 4.15.0 → 4.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -510,6 +510,20 @@ class CameraController(
|
|
|
510
510
|
|
|
511
511
|
private fun computeRotationDegrees(): Int {
|
|
512
512
|
val displayRotation = displayRotationDegrees()
|
|
513
|
+
if (sensorOrientation == 0) {
|
|
514
|
+
return if (useFrontCamera) {
|
|
515
|
+
(360 - displayRotation) % 360
|
|
516
|
+
} else {
|
|
517
|
+
displayRotation
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
if (sensorOrientation == 180) {
|
|
521
|
+
return if (useFrontCamera) {
|
|
522
|
+
(180 + displayRotation) % 360
|
|
523
|
+
} else {
|
|
524
|
+
(180 - displayRotation + 360) % 360
|
|
525
|
+
}
|
|
526
|
+
}
|
|
513
527
|
return if (useFrontCamera) {
|
|
514
528
|
(sensorOrientation + displayRotation) % 360
|
|
515
529
|
} else {
|