mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
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:
parent
898e0b8588
commit
a801c7d305
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user