Label Capture Basic Overlay

Defined under the namespace Scandit.Datacapture.Label.Ui

LabelCaptureBasicOverlay
class LabelCaptureBasicOverlay : DataCaptureOverlay

Added in version 7.2.0

Overlay for label capture that displays captured labels and their fields on top of the frames. When labels are successfully recognized, the label background as well as the fields are highlighted.

Fields are highlighted using a default brush (getDefaultFieldBrush() with LabelFieldState.Captured, getDefaultFieldBrush() with LabelFieldState.Predicted), a brush set through a user-defined LabelCaptureBasicOverlayListener or calls to setBrushForField().

withLabelCaptureForView(labelCapture, view)
static withLabelCaptureForView(labelCapture: LabelCapture,
        view: DataCaptureView): Promise<LabelCaptureBasicOverlay>

Added in version 7.2.0

Constructs a new overlay to visualize the process of label capture. When view is non-null, the overlay is automatically added to the view. Otherwise, the overlay needs to be added through a call to DataCaptureView.addOverlay().

withLabelCapture(labelCapture)
static withLabelCapture(labelCapture: LabelCapture): Promise<LabelCaptureBasicOverlay>

Added in version 7.2.0

Constructs a new overlay to visualize the process of label capture. The overlay needs to be added through a call to DataCaptureView.addOverlay().

setListener(labelCaptureBasicOverlayListener)
setListener(labelCaptureBasicOverlayListener?: LabelCaptureBasicOverlayListener): Promise<void>

Added in version 7.2.0

getListener()
getListener(): Promise<LabelCaptureBasicOverlayListener | null>

Added in version 7.2.0

setBrushForField(brush, field, label)
setBrushForField(brush: Brush,
        field: LabelField,
        label: CapturedLabel): Promise<void>

Added in version 7.2.0

The method can be called to change the visualization style of a field.

setBrushForLabel(brush, label)
setBrushForLabel(brush: Brush,
        label: CapturedLabel): Promise<void>

Added in version 7.2.0

The method can be called to change the visualization style of a label. This method is thread-safe; it can be called from any thread.

getDefaultFieldBrush(fieldState)
getDefaultFieldBrush(fieldState: LabelFieldState): Promise<Brush>

Added in version 7.2.0

Returns the default brush to draw fields of the provided state. Valid values for state are LabelFieldState.Predicted and LabelFieldState.Captured.

setDefaultFieldBrush(brush, fieldState)
setDefaultFieldBrush(brush: Brush,
        fieldState: LabelFieldState): Promise<void>

Added in version 7.2.0

Sets the default brush to draw fields of the provided state. Valid values for state are LabelFieldState.Predicted and LabelFieldState.Captured.

getDefaultLabelBrush()
getDefaultLabelBrush(): Promise<Brush>

Added in version 7.2.0

Returns the default brush used for drawing labels.

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

Added in version 7.2.0

Sets the default brush used for drawing labels.

getShouldShowScanAreaGuides()
getShouldShowScanAreaGuides(): Promise<boolean>

Added in version 7.2.0

Returns whether scan area guides are shown on top of the preview.

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

Added in version 7.2.0

Sets whether to show scan area guides on top of the preview.

getViewfinder()
getViewfinder(): Promise<Viewfinder | null>

Added in version 7.2.0

Returns the current viewfinder.

setViewfinder(viewFinder)
setViewfinder(viewFinder: Viewfinder): Promise<void>

Added in version 7.2.0

Sets the viewfinder. By default, the viewfinder is null. Call this method with an instance of Viewfinder if you want to draw a viewfinder.