Barcode Capture Overlay

Defined under the namespace Scandit.Datacapture.Barcode.Ui

BarcodeCaptureOverlayStyle

Added in version 6.13.0

The style of the BarcodeCaptureOverlay.

Deprecated since version 6.26: This enum is deprecated and will be removed in the future.

Frame

Added in version 6.13.0

Style that draws the highlights as a rectangular frame and adds an animation for when a code is scanned.

BarcodeCaptureOverlay
class BarcodeCaptureOverlay : DataCaptureOverlay

Added in version 6.13.0

Overlay for the BarcodeCapture capture mode that displays recognized barcodes on top of a data capture view.

The appearance of the visualized barcodes can be configured or turned off completely through the setBrush() method.

withBarcodeCaptureForView(barcodeCapture, view)
static withBarcodeCaptureForView(barcodeCapture: BarcodeCapture,
        view: DataCaptureView | null): Promise<BarcodeCaptureOverlay>

Added in version 6.13.0

Constructs a new barcode capture overlay for the provided barcode capture instance. When passing a non-null view instance, the overlay is automatically added to the view.

withBarcodeCaptureForViewWithStyle(barcodeCapture, view, style)
static withBarcodeCaptureForViewWithStyle(
        barcodeCapture: BarcodeCapture,
        view: DataCaptureView | null,
        style: BarcodeCaptureOverlayStyle): Promise<BarcodeCaptureOverlay>

Added in version 6.13.0

Constructs a new barcode capture overlay for the provided barcode capture instance and style. When passing a non-null view instance, the overlay is automatically added to the view.

withBarcodeCapture(barcodeCapture)
static withBarcodeCapture(barcodeCapture: BarcodeCapture): Promise<BarcodeCaptureOverlay>

Added in version 6.13.0

Constructs a new barcode capture overlay for the provided barcode capture instance. For the overlay to be displayed on screen, it must be added to a DataCaptureView.

getViewfinder()
getViewfinder(): Viewfinder | null

Added in version 6.13.0

Get the viewfinder. By default, the viewfinder is null.

setViewfinder(viewfinder)
setViewfinder(viewfinder: Viewfinder | null): Promise<void>

Added in version 6.13.0

Set the viewfinder. By default, the viewfinder is null. Set this to an instance of Viewfinder if you want to draw a viewfinder.

getBrush()
getBrush(): Brush

Added in version 6.13.0

Get the brush used for visualizing a recognized barcode in the UI. To turn off drawing of locations, set the brush to use both a transparent fill and stroke color. By default, the brush has a transparent fill color, a “Scandit”-blue stroke color, and a stroke width of 1.

setBrush(brush)
setBrush(brush: Brush): Promise<void>

Added in version 6.13.0

Set the brush used for visualizing a recognized barcode in the UI. To turn off drawing of locations, set the brush to use both a transparent fill and stroke color. By default, the brush has a transparent fill color, a “Scandit”-blue stroke color, and a stroke width of 1.

shouldShowScanAreaGuides()
shouldShowScanAreaGuides(): boolean

Added in version 6.13.0

Get whether area guides are shown on top of the preview. This property is useful during development to visualize the current scan areas on screen. It is not meant to be used for production. By default this property is false.

shouldRemoveLocationsAfterScan()
shouldRemoveLocationsAfterScan(): boolean

Added in version 6.21.0

Get whether barcode locations should remain after the scan on top of the preview. By default this property is true.

setShouldShowScanAreaGuides(shouldShowScanAreaGuides)
setShouldShowScanAreaGuides(shouldShowScanAreaGuides: boolean): Promise<void>

Added in version 6.13.0

Set whether to show scan area guides on top of the preview. This property is useful during development to visualize the current scan areas on screen. It is not meant to be used for production. By default this property is false.

setShouldRemoveLocationsAfterScan(shouldRemoveLocationsAfterScan)
setShouldRemoveLocationsAfterScan(shouldRemoveLocationsAfterScan: boolean): Promise<void>

Added in version 6.21.0

Set whether to remove scanned barcode locations after scan. By default this property is true. Set to false if you want to freeze the barcode locations after scan.

style
get style(): BarcodeCaptureOverlayStyle

Added in version 6.13.0

The overlay style. Defaults to Frame.