react-native-rectangle-doc-scanner 4.14.0 → 4.15.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.
|
@@ -548,18 +548,12 @@ class CameraController(
|
|
|
548
548
|
}
|
|
549
549
|
previewView.setTransform(matrix)
|
|
550
550
|
|
|
551
|
-
//
|
|
552
|
-
val
|
|
553
|
-
val bufferAspect = bufferWidth / bufferHeight
|
|
551
|
+
// Uniform center-crop to fill the view.
|
|
552
|
+
val scale = max(viewWidth / bufferWidth, viewHeight / bufferHeight)
|
|
554
553
|
previewView.pivotX = centerX
|
|
555
554
|
previewView.pivotY = centerY
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
previewView.scaleY = 1f
|
|
559
|
-
} else {
|
|
560
|
-
previewView.scaleX = 1f
|
|
561
|
-
previewView.scaleY = viewAspect / bufferAspect
|
|
562
|
-
}
|
|
555
|
+
previewView.scaleX = scale
|
|
556
|
+
previewView.scaleY = scale
|
|
563
557
|
}
|
|
564
558
|
|
|
565
559
|
private fun chooseBestSize(
|