Skip to content

Commit 41b57ae

Browse files
committed
docs: add another way to set scan region - DCE as ISA
1 parent 6960925 commit 41b57ae

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

programming/features/barcode-scan-region.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ settings.roi.points[2] = {x:90, y:90};
3333
settings.roi.points[3] = {x:10, y:90};
3434
// Update the settings to a specific template.
3535
await router.updateSettings("ReadSingleBarcode", settings);
36+
37+
// Alternatively, you can set the scan region directly at the image source in a simpler way.
38+
// If you’re using Dynamsoft Camera Enhancer, the following example demonstrates
39+
// how to specify a single scan region without modifying the template.
40+
41+
let cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance();
42+
cameraEnhancer.setScanRegion({
43+
x: 10,
44+
y: 10,
45+
width: 80,
46+
height: 80,
47+
isMeasuredInPercentage: true,
48+
});
49+
3650
```
3751
>
3852
```c++

0 commit comments

Comments
 (0)