react-native-rectangle-doc-scanner 10.45.0 → 10.46.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.
|
@@ -533,26 +533,10 @@ class CameraController(
|
|
|
533
533
|
val centerX = viewWidth / 2f
|
|
534
534
|
val centerY = viewHeight / 2f
|
|
535
535
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
if (rotationDegrees != 0f) {
|
|
543
|
-
matrix.postRotate(rotationDegrees, centerX, centerY)
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
val rotatedBufferWidth = if (rotationDegrees == 90f || rotationDegrees == 270f) {
|
|
547
|
-
bufferHeight
|
|
548
|
-
} else {
|
|
549
|
-
bufferWidth
|
|
550
|
-
}
|
|
551
|
-
val rotatedBufferHeight = if (rotationDegrees == 90f || rotationDegrees == 270f) {
|
|
552
|
-
bufferWidth
|
|
553
|
-
} else {
|
|
554
|
-
bufferHeight
|
|
555
|
-
}
|
|
536
|
+
// CameraX already handles rotation via targetRotation
|
|
537
|
+
// The buffer is already in the correct orientation
|
|
538
|
+
val rotatedBufferWidth = bufferWidth
|
|
539
|
+
val rotatedBufferHeight = bufferHeight
|
|
556
540
|
|
|
557
541
|
// Scale to fill the view while maintaining aspect ratio (center-crop).
|
|
558
542
|
val scaleX = viewWidth.toFloat() / rotatedBufferWidth.toFloat()
|
package/package.json
CHANGED