react-native-rectangle-doc-scanner 7.59.0 → 7.61.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.
|
@@ -661,11 +661,7 @@ class CameraController(
|
|
|
661
661
|
if (viewWidth == 0f || viewHeight == 0f) return
|
|
662
662
|
|
|
663
663
|
val rotationDegrees = computeRotationDegrees()
|
|
664
|
-
val transformRotation =
|
|
665
|
-
(360 - rotationDegrees) % 360
|
|
666
|
-
} else {
|
|
667
|
-
rotationDegrees
|
|
668
|
-
}
|
|
664
|
+
val transformRotation = rotationDegrees
|
|
669
665
|
Log.d(
|
|
670
666
|
TAG,
|
|
671
667
|
"[TRANSFORM] rotation=$transformRotation view=${viewWidth}x${viewHeight} preview=${preview.width}x${preview.height}"
|
|
@@ -682,7 +678,7 @@ class CameraController(
|
|
|
682
678
|
val bufferRect = RectF(0f, 0f, bufferWidth, bufferHeight)
|
|
683
679
|
bufferRect.offset(centerX - bufferRect.centerX(), centerY - bufferRect.centerY())
|
|
684
680
|
|
|
685
|
-
matrix.setRectToRect(
|
|
681
|
+
matrix.setRectToRect(bufferRect, viewRect, Matrix.ScaleToFit.FILL)
|
|
686
682
|
val scale = max(viewWidth / bufferWidth, viewHeight / bufferHeight)
|
|
687
683
|
matrix.postScale(scale, scale, centerX, centerY)
|
|
688
684
|
if (transformRotation != 0) {
|