react-native-rectangle-doc-scanner 10.11.0 → 10.12.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.
|
@@ -456,8 +456,8 @@ class CameraController(
|
|
|
456
456
|
val centerY = viewHeight / 2f
|
|
457
457
|
|
|
458
458
|
// Camera sensor is landscape (1440x1088), but we want portrait display
|
|
459
|
-
// Rotate 90 degrees
|
|
460
|
-
matrix.postRotate(
|
|
459
|
+
// Rotate 270 degrees (or -90 degrees) to make it portrait with correct orientation
|
|
460
|
+
matrix.postRotate(270f, centerX, centerY)
|
|
461
461
|
|
|
462
462
|
// After rotation, the buffer dimensions are swapped
|
|
463
463
|
val rotatedBufferWidth = bufferHeight // 1088
|
|
@@ -468,7 +468,7 @@ class CameraController(
|
|
|
468
468
|
val scaleY = viewHeight.toFloat() / rotatedBufferHeight.toFloat()
|
|
469
469
|
val scale = scaleX.coerceAtLeast(scaleY) // Use max to fill
|
|
470
470
|
|
|
471
|
-
Log.d(TAG, "[TRANSFORM] ScaleX: $scaleX, ScaleY: $scaleY, Using: $scale")
|
|
471
|
+
Log.d(TAG, "[TRANSFORM] Rotation: 270°, ScaleX: $scaleX, ScaleY: $scaleY, Using: $scale")
|
|
472
472
|
|
|
473
473
|
matrix.postScale(scale, scale, centerX, centerY)
|
|
474
474
|
|
package/package.json
CHANGED