afriscic / BarcodeScanning.Native.Maui

Barcode scanning library for .NET MAUI
https://www.nuget.org/packages/BarcodeScanning.Native.Maui
MIT License
162 stars 31 forks source link

Scan box #59

Closed e808080 closed 4 months ago

e808080 commented 4 months ago

This library is remarkably good in scanning barcodes and QR codes. However, is there any possibility to have a scan box or similar instead of the red dot aim? (such as https://user-images.githubusercontent.com/68213/58515686-9c98ea00-8173-11e9-9152-eeaac1e2a464.png)

afriscic commented 4 months ago

Hello.

To be honest, I'm quite reluctant to implement different scanning overlays as everybody likes something different and maintaining native UI for every platform is a bit of a hassle. You can implement this inside MAUI itself if you put GraphicsView with your UI on top of CameraView and set GraphicsView InputTransparent="True". See ScanPage.xaml for an example. Then in CameraView_OnDetectionFinished event you just reject any barcode that is outside your desired region.

e808080 commented 4 months ago

Understood, thanks for the reply