Barcode Ar Highlight
Defined under the namespace Scandit.Datacapture.Barcode.Ar.Ui
- BarcodeArHighlight
interface BarcodeArHighlight : ScanditHTMLElement
Added in version 7.1.0
Common interface for Barcode Ar highlights. Highlights let the user identify the scanned barcode. They are shown on top of the respective barcode and are displayed as soon as the respective barcode is scanned. They are available in different shapes and have configurable styles. Currently, two types of highlights are supported: BarcodeArCircleHighlight and BarcodeArRectangleHighlight.
- icon
icon: ScanditIcon | null
Added in version 7.1.0
The icon that this highlight uses.
- width
width?: number
Added in version 7.3.0
Will be set with the width of the barcode if there’s a setter.
- height
height?: number
Added in version 7.3.0
The setter will be update with the height of the barcode.
- updatePosition(point, transformOrigin, rotationAngle)
updatePosition(point: Point, transformOrigin: Point, rotationAngle: number):
void
Added in version 7.3.0
Update the position of the element with the given point, transform origin based on the anchor if any. RotationAngle is the angle of the barcode.
Example of updating the position of the annotation:
updatePosition(point, transformOrigin, rotationAngle) { this.style.transform = `translate3d(calc(${Math.round(point.x)}px + ${transformOrigin.x}%), calc(${Math.round( point.y )}px + ${transformOrigin.y}%), 0px) rotate(${rotationAngle}deg)`; }