Skip to content

Commit

Permalink
feat(dynamsoft-barcode): add setFocus and setZoom (#4281)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
xulihang committed Sep 5, 2022
1 parent 898e0b8 commit a801c7d
Showing 1 changed file with 24 additions and 0 deletions.
Expand Up @@ -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[];
}

Expand Down Expand Up @@ -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;
}

}

0 comments on commit a801c7d

Please sign in to comment.