From a801c7d3054d285c962b4657f4b224c9a9ad67cf Mon Sep 17 00:00:00 2001 From: Lihang Xu Date: Tue, 6 Sep 2022 01:04:21 +0800 Subject: [PATCH] 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 --- .../dynamsoft-barcode-scanner/index.ts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/@awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner/index.ts b/src/@awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner/index.ts index d9efd38680..a28f31b5f9 100755 --- a/src/@awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner/index.ts +++ b/src/@awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner/index.ts @@ -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 { return; } + + /** + * set zoom + * @param factor {number} zoom factor + * @return {Promise} Returns a promise + */ + @Cordova({ successIndex: 1, errorIndex: 2 }) + setZoom(factor: number): Promise { + return; + } + + /** + * set focus + * @param point {x:number,y:number} focus point + * @return {Promise} Returns a promise + */ + @Cordova({ successIndex: 1, errorIndex: 2 }) + setFocus(point: {x:number,y:number}): Promise { + return; + } + }