mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 01:19:36 +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
|
* dceLicense: License of Dynamsoft Camera Enhancer
|
||||||
* resolution: use EnumResolution
|
* resolution: use EnumResolution
|
||||||
|
* rotate: convert frame to bitmap and rotate it
|
||||||
*/
|
*/
|
||||||
export interface ScanOptions {
|
export interface ScanOptions {
|
||||||
dceLicense?: string;
|
dceLicense?: string;
|
||||||
resolution?: number;
|
resolution?: number;
|
||||||
|
rotate?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FrameResult {
|
export interface FrameResult {
|
||||||
frameWidth: number;
|
frameWidth: number;
|
||||||
frameHeight: number;
|
frameHeight: number;
|
||||||
|
frameRotation: number;
|
||||||
results: BarcodeResult[];
|
results: BarcodeResult[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,4 +186,25 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
|
|||||||
switchTorch(desiredStatus: string): Promise<any> {
|
switchTorch(desiredStatus: string): Promise<any> {
|
||||||
return;
|
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