feat(dynamsoft-barcode): add setFocus and setZoom (#4281)

* add set zoom for Dynamsoft Barcode Scanner

* update Dynamsoft Barcode Scanner to add setFocus

* feat: add rotate scan option and rotation frame result to Dynamsoft Barcode Scanner

* add comments and rename the rotation result for Dynamsoft Barcode Scanner
This commit is contained in:
Lihang Xu 2022-09-06 01:04:21 +08:00 committed by GitHub
parent 898e0b8588
commit a801c7d305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,15 +12,18 @@ import { Observable } from 'rxjs';
/**
* dceLicense: License of Dynamsoft Camera Enhancer
* resolution: use EnumResolution
* rotate: convert frame to bitmap and rotate it
*/
export interface ScanOptions {
dceLicense?: string;
resolution?: number;
rotate?: boolean;
}
export interface FrameResult {
frameWidth: number;
frameHeight: number;
frameRotation: number;
results: BarcodeResult[];
}
@ -183,4 +186,25 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
switchTorch(desiredStatus: string): Promise<any> {
return;
}
/**
* set zoom
* @param factor {number} zoom factor
* @return {Promise<any>} Returns a promise
*/
@Cordova({ successIndex: 1, errorIndex: 2 })
setZoom(factor: number): Promise<any> {
return;
}
/**
* set focus
* @param point {x:number,y:number} focus point
* @return {Promise<any>} Returns a promise
*/
@Cordova({ successIndex: 1, errorIndex: 2 })
setFocus(point: {x:number,y:number}): Promise<any> {
return;
}
}