react-native-rectangle-doc-scanner 3.197.0 → 3.198.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.
@@ -369,14 +369,8 @@ class CameraController(
369
369
  val centerY = viewRect.centerY()
370
370
 
371
371
  bufferRect.offset(centerX - bufferRect.centerX(), centerY - bufferRect.centerY())
372
- matrix.setRectToRect(viewRect, bufferRect, Matrix.ScaleToFit.FILL)
373
-
374
- val scale = if (rotationDegrees == 90 || rotationDegrees == 270) {
375
- maxOf(viewHeight.toFloat() / previewSize.height, viewWidth.toFloat() / previewSize.width)
376
- } else {
377
- maxOf(viewWidth.toFloat() / previewSize.width, viewHeight.toFloat() / previewSize.height)
378
- }
379
- matrix.postScale(scale, scale, centerX, centerY)
372
+ // Fill the view while preserving aspect ratio (center-crop).
373
+ matrix.setRectToRect(bufferRect, viewRect, Matrix.ScaleToFit.FILL)
380
374
 
381
375
  when (rotationDegrees) {
382
376
  90 -> matrix.postRotate(90f, centerX, centerY)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.197.0",
3
+ "version": "3.198.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",