Skip to content

Commit a801c7d

Browse files
authored
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
1 parent 898e0b8 commit a801c7d

File tree

1 file changed

+24
-0
lines changed
  • src/@awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner

1 file changed

+24
-0
lines changed

src/@awesome-cordova-plugins/plugins/dynamsoft-barcode-scanner/index.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ import { Observable } from 'rxjs';
1212
/**
1313
* dceLicense: License of Dynamsoft Camera Enhancer
1414
* resolution: use EnumResolution
15+
* rotate: convert frame to bitmap and rotate it
1516
*/
1617
export interface ScanOptions {
1718
dceLicense?: string;
1819
resolution?: number;
20+
rotate?: boolean;
1921
}
2022

2123
export interface FrameResult {
2224
frameWidth: number;
2325
frameHeight: number;
26+
frameRotation: number;
2427
results: BarcodeResult[];
2528
}
2629

@@ -183,4 +186,25 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
183186
switchTorch(desiredStatus: string): Promise<any> {
184187
return;
185188
}
189+
190+
/**
191+
* set zoom
192+
* @param factor {number} zoom factor
193+
* @return {Promise<any>} Returns a promise
194+
*/
195+
@Cordova({ successIndex: 1, errorIndex: 2 })
196+
setZoom(factor: number): Promise<any> {
197+
return;
198+
}
199+
200+
/**
201+
* set focus
202+
* @param point {x:number,y:number} focus point
203+
* @return {Promise<any>} Returns a promise
204+
*/
205+
@Cordova({ successIndex: 1, errorIndex: 2 })
206+
setFocus(point: {x:number,y:number}): Promise<any> {
207+
return;
208+
}
209+
186210
}

0 commit comments

Comments
 (0)