Label Capture Basic Overlay

Defined under the namespace Scandit.Datacapture.Label.Ui

LabelCaptureBasicOverlay
class LabelCaptureBasicOverlay : DataCaptureOverlay

Added in version 6.5.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 (capturedFieldBrush, predictedFieldBrush), a brush set through a user-defined LabelCaptureBasicOverlayListener or calls to setBrushForFieldOfLabel().

withLabelCaptureForView(labelCapture, view)
static withLabelCaptureForView(labelCapture: LabelCapture,
        view: DataCaptureView | null): LabelCaptureBasicOverlay

Added in version 6.5.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): LabelCaptureBasicOverlay

Added in version 6.5.0

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

listener
listener: LabelCaptureBasicOverlayListener | null

Added in version 6.5.0

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

Added in version 6.5.0

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

When listener is set to a non-null instance, the listener continues to be asked for the brush to use for this field whenever the state changes, thereby replacing any brushes set by calling setBrushForFieldOfLabel().

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

Added in version 6.5.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.

When listener is set to a non-null instance, the listener continues to be asked for the brush to use for this label whenever the state of one its fields changes, thereby replacing any brushes set by calling setBrushForLabel().

defaultPredictedFieldBrush
static get defaultPredictedFieldBrush(): Brush

Added in version 6.5.0

The default brush applied to predicted fields. This is the brush used if LabelCaptureBasicOverlayListener is not set.

defaultCapturedFieldBrush
static get defaultCapturedFieldBrush(): Brush

Added in version 6.5.0

The default brush applied to captured fields. This is the brush used if LabelCaptureBasicOverlayListener is not set.

defaultLabelBrush
static get defaultLabelBrush(): Brush

Added in version 6.5.0

The default brush used for drawing labels. This brush is used when no listener is set, or the LabelCaptureBasicOverlayListener.brushForLabel() returns a null brush.

predictedFieldBrush
predictedFieldBrush: Brush | null

Added in version 6.5.0

The brush applied to predicted fields if no LabelCaptureBasicOverlayListener is set.

capturedFieldBrush
capturedFieldBrush: Brush | null

Added in version 6.5.0

The brush applied to captured fields if no LabelCaptureBasicOverlayListener is set.

labelBrush
labelBrush: Brush | null

Added in version 6.5.0

The brush used for drawing labels if no listener is set, or the LabelCaptureBasicOverlayListener.brushForLabel() returns a null brush.

shouldShowScanAreaGuides
shouldShowScanAreaGuides: boolean

Added in version 6.5.0

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.

viewfinder
viewfinder: Viewfinder | null

Added in version 6.8.0

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