react-native-rectangle-doc-scanner 7.24.0 → 7.26.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.
|
@@ -572,7 +572,7 @@ class CameraController(
|
|
|
572
572
|
val centerX = viewRect.centerX()
|
|
573
573
|
val centerY = viewRect.centerY()
|
|
574
574
|
|
|
575
|
-
//
|
|
575
|
+
// Use uniform scaling to avoid stretching; then center-crop to fill.
|
|
576
576
|
matrix.setRectToRect(bufferRect, viewRect, Matrix.ScaleToFit.CENTER)
|
|
577
577
|
val scale = max(viewWidth / bufferWidth, viewHeight / bufferHeight)
|
|
578
578
|
matrix.postScale(scale, scale, centerX, centerY)
|