react-native-rectangle-doc-scanner 10.17.0 → 10.19.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.
|
@@ -486,16 +486,13 @@ class CameraController(
|
|
|
486
486
|
val centerY = viewHeight / 2f
|
|
487
487
|
|
|
488
488
|
// Calculate rotation from buffer to display coordinates.
|
|
489
|
-
val rotationDegrees =
|
|
490
|
-
((displayRotationDegrees + sensorOrientation) % 360).toFloat()
|
|
491
|
-
} else {
|
|
492
|
-
((displayRotationDegrees - sensorOrientation + 360) % 360).toFloat()
|
|
493
|
-
}
|
|
489
|
+
val rotationDegrees = ((sensorOrientation + displayRotationDegrees) % 360).toFloat()
|
|
494
490
|
|
|
495
491
|
Log.d(TAG, "[TRANSFORM] Applying rotation: ${rotationDegrees}°")
|
|
496
492
|
|
|
497
493
|
if (rotationDegrees != 0f) {
|
|
498
|
-
matrix
|
|
494
|
+
// TextureView matrix rotation direction can be opposite of expectation on some devices.
|
|
495
|
+
matrix.postRotate(-rotationDegrees, centerX, centerY)
|
|
499
496
|
}
|
|
500
497
|
|
|
501
498
|
// After rotation, determine effective buffer size
|
package/package.json
CHANGED