From c11b6a8c1f0700c28d3ef1120bb4575df66b5af5 Mon Sep 17 00:00:00 2001 From: redth Date: Tue, 30 Aug 2022 16:37:27 -0400 Subject: [PATCH] Add TryInverted option Fixes #18 --- ZXing.Net.MAUI/BarcodeScannerOptions.cs | 3 +++ ZXing.Net.MAUI/ZXingBarcodeReader.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/ZXing.Net.MAUI/BarcodeScannerOptions.cs b/ZXing.Net.MAUI/BarcodeScannerOptions.cs index 20b71d7..c20f167 100644 --- a/ZXing.Net.MAUI/BarcodeScannerOptions.cs +++ b/ZXing.Net.MAUI/BarcodeScannerOptions.cs @@ -4,8 +4,11 @@ public record BarcodeReaderOptions { public bool AutoRotate { get; init; } + public bool TryHarder { get; init; } + public bool TryInverted { get; init; } + public BarcodeFormat Formats { get; init; } public bool Multiple { get; init; } diff --git a/ZXing.Net.MAUI/ZXingBarcodeReader.cs b/ZXing.Net.MAUI/ZXingBarcodeReader.cs index f024f8d..b7e473e 100644 --- a/ZXing.Net.MAUI/ZXingBarcodeReader.cs +++ b/ZXing.Net.MAUI/ZXingBarcodeReader.cs @@ -22,6 +22,7 @@ public BarcodeReaderOptions Options zxingReader.Options.PossibleFormats = options.Formats.ToZXingList(); zxingReader.Options.TryHarder = options.TryHarder; zxingReader.AutoRotate = options.AutoRotate; + zxingReader.Options.TryInverted = options.TryInverted; } }