Label Capture Basic Overlay
Defined in namespace Scandit.DataCapture.Label.UI.Overlay
- LabelCaptureBasicOverlay
class LabelCaptureBasicOverlay : IDataCaptureOverlay, IDisposable
Added in version 8.1.0
Overlay for label capture that provides visual feedback and customization capabilities for the scanning process. This overlay displays captured labels and their fields on top of the camera preview, offering extensive customization options through listener interfaces.
Key visualization features:
Label highlighting - Configurable visual feedback for detected labels
Field state indication - Different visual styles for predicted vs. captured fields
Custom brush configuration - Fully customizable appearance for labels and fields
Listener-based customization - Programmatic control over field appearances
The overlay distinguishes between different field states:
Predicted fields - Fields that have been detected but not yet captured
Captured fields - Fields that have been successfully scanned and validated
Advanced customization is available through ILabelCaptureBasicOverlayListener, allowing dynamic styling based on field content, validation status, or other contextual information.,
Fields are highlighted using a default brush (CapturedFieldBrush, PredictedFieldBrush), a brush set through a user-defined ILabelCaptureBasicOverlayListener or calls to SetBrushForField().
- Create()
static LabelCaptureBasicOverlay Create(
LabelCapturelabelCapture, DataCaptureView view)Added in version 8.1.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().
- Create()
static LabelCaptureBasicOverlay Create(
LabelCapturelabelCapture)Added in version 8.1.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
ILabelCaptureBasicOverlayListener Listener { get;set; }
Added in version 8.1.0
- SetBrushForField()
voidSetBrushForField(Brush brush, LabelField field, CapturedLabel label)Added in version 8.1.0
Sets a custom brush to visually highlight a specific field within a captured label. This allows for dynamic styling based on field content, validation status, or other contextual information.
Use this method to provide visual feedback for specific fields, such as highlighting errors, successful captures, or fields requiring attention.
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 SetBrushForField().
- SetBrushForLabel()
voidSetBrushForLabel(Brush brush, CapturedLabel label)Added in version 8.1.0
Sets a custom brush to visually highlight a specific captured label. This allows for dynamic styling of entire labels based on their completion status, validation results, or other contextual information.
Use this method to provide visual feedback for labels, such as highlighting complete vs. incomplete labels, or marking labels that require validation. 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 Brush DefaultPredictedFieldBrush { get; }
Added in version 8.1.0
The default brush applied to predicted fields. This is the brush used if ILabelCaptureBasicOverlayListener is not set.
- DefaultCapturedFieldBrush
static Brush DefaultCapturedFieldBrush { get; }
Added in version 8.1.0
The default brush applied to captured fields. This is the brush used if ILabelCaptureBasicOverlayListener is not set.
- DefaultLabelBrush
static Brush DefaultLabelBrush { get; }
Added in version 8.1.0
The default brush used for drawing labels. This brush is used when no Listener is set, or the ILabelCaptureBasicOverlayListener.BrushForLabel() returns a null brush.
- PredictedFieldBrush
Brush PredictedFieldBrush { get;set; }
Added in version 8.1.0
The brush applied to predicted fields if no ILabelCaptureBasicOverlayListener is set.
- GetFieldBrush()
Brush GetFieldBrush(LabelFieldState state)
Added in version 8.1.0
Returns the default brush to draw fields of the provided state. Valid values for state are LabelFieldState.Predicted and LabelFieldState.Captured.
- SetFieldBrush()
voidSetFieldBrush(LabelFieldState state, Brush brush)Added in version 8.1.0
Sets the default brush to draw fields of the provided state. Valid values for state are LabelFieldState.Predicted and LabelFieldState.Captured.
- ShouldShowScanAreaGuides
boolShouldShowScanAreaGuides { get;set; }Added in version 8.1.0
Controls whether scan area guides are displayed over the camera preview. These guides help visualize the active scanning regions during development and debugging.
This feature is intended for development purposes only and should not be enabled in production applications. By default this property is false.
- Viewfinder
IViewfinder Viewfinder { get;set; }
Added in version 8.1.0
The viewfinder used to guide users during the scanning process. The viewfinder provides visual cues about the optimal scanning area and helps users position labels correctly.
By default, no viewfinder is displayed. Set this to an instance of IViewfinder (such as RectangularViewfinder) to provide scanning guidance to users.