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

@@ -75,14 +75,15 @@ impl Reader for QRCodeReader {
// If the code was mirrored: swap the bottom-left and the top-right points.
if let Some(other) = decoderRXingResult.getOther() {
if other.is::<QRCodeDecoderMetaData>() {
// if (decoderRXingResult.getOther() instanceof QRCodeDecoderMetaData) {
if other.is::<QRCodeDecoderMetaData>() {
// if (decoderRXingResult.getOther() instanceof QRCodeDecoderMetaData) {
other
.downcast_ref::<QRCodeDecoderMetaData>()
.unwrap()
.applyMirroredCorrection(&mut points);
// ((QRCodeDecoderMetaData) decoderRXingResult.getOther()).applyMirroredCorrection(points);
}}
.downcast_ref::<QRCodeDecoderMetaData>()
.unwrap()
.applyMirroredCorrection(&mut points);
// ((QRCodeDecoderMetaData) decoderRXingResult.getOther()).applyMirroredCorrection(points);
}
}
let mut result = RXingResult::new(
decoderRXingResult.getText(),