decode tests pass

This commit is contained in:
Henry Schimke
2022-12-26 11:38:54 -06:00
parent f07d546083
commit 9d215d9f99
6 changed files with 406 additions and 300 deletions

View File

@@ -59,13 +59,14 @@ impl MultipleBarcodeReader for QRCodeMultiReader {
)?;
let mut points = detectorRXingResult.getPoints().clone();
// If the code was mirrored: swap the bottom-left and the top-right points.
if let Some( other) = decoderRXingResult.getOther(){
if other.is::<QRCodeDecoderMetaData>() {
(other
.downcast::<QRCodeDecoderMetaData>()
.expect("must downcast to QRCodeDecoderMetaData"))
.applyMirroredCorrection(&mut points);
}}
if let Some(other) = decoderRXingResult.getOther() {
if other.is::<QRCodeDecoderMetaData>() {
(other
.downcast::<QRCodeDecoderMetaData>()
.expect("must downcast to QRCodeDecoderMetaData"))
.applyMirroredCorrection(&mut points);
}
}
// if (decoderRXingResult.getOther() instanceof QRCodeDecoderMetaData) {
// ((QRCodeDecoderMetaData) decoderRXingResult.getOther()).applyMirroredCorrection(points);
// }