Skip to content

Commit ab6ec2e

Browse files
Merge pull request #73 from dynamsoft-docs/preview
Added notes for scan region value range
2 parents 9b862cc + 20bc919 commit ab6ec2e

6 files changed

Lines changed: 22 additions & 9 deletions

File tree

programming/android/guide/scan-region.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ permalink: /programming/android/guide/scan-region.html
1515

1616
```java
1717
DSRect region = new DSRect();
18-
region.left = 0.15;
19-
region.right = 0.85;
20-
region.top = 0.3;
21-
region.bottom = 0.7;
18+
region.left = 0.15f;
19+
region.right = 0.85f;
20+
region.top = 0.3f;
21+
region.bottom = 0.7f;
2222
region.isMeasuredInPercentage = true;
2323
try {
2424
mCameraEnhancer.setScanRegion(region);
@@ -54,10 +54,10 @@ Since the scan region is set for the video streaming, its coordinate system migh
5454

5555
```java
5656
DSRect region = new DSRect();
57-
region.left = 0.15;
58-
region.right = 0.85;
59-
region.top = 0.3;
60-
region.bottom = 0.7;
57+
region.left = 0.15f;
58+
region.right = 0.85f;
59+
region.top = 0.3f;
60+
region.bottom = 0.7f;
6161
region.isMeasuredInPercentage = true;
6262
try {
6363
mCameraEnhancer.setScanRegion(region);

programming/android/primary-api/camera-enhancer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ void setScanRegion(DSRect scanRegion) throws CameraEnhancerException{}
438438

439439
A bool value that indicates whether the scan region has been successfully set or not.
440440

441-
**Code Snippet**
441+
> [!Note]
442+
> The valid range for left, right, top, and bottom is [0.0, 1.0] when measuredInPercentage is true.
442443
443444
### getScanRegion
444445

programming/flutter/api-reference/camera-enhancer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ Future<void> setScanRegion(DSRect region) async;
193193

194194
- [`DSRect`]({{ site.dcv_flutter_api }}core/dsrect.html).
195195

196+
> [!Note]
197+
> The valid range for left, right, top, and bottom is [0.0, 1.0] when measuredInPercentage is true.
198+
196199
### setZoomFactor
197200

198201
Sets the zoom factor of the camera.

programming/ios/primary-api/camera-enhancer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,9 @@ func setScanRegion(_ scanRegion: DSRect) -> BOOL
634634

635635
A bool value that indicates whether the scan region has been successfully set or not.
636636

637+
> [!Note]
638+
> The valid range for left, right, top, and bottom is [0.0, 1.0] when measuredInPercentage is true.
639+
637640
### getScanRegion
638641

639642
Get the scan region if one has been set.

programming/maui/api-reference/camera-enhancer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ void SetScanRegion(DMRect scanRegion);
124124

125125
`scanRegion`: A [`DMRect`]({{ site.dcv_maui_api }}core/rect.html) object.
126126

127+
> [!Note]
128+
> The valid range for left, right, top, and bottom is [0.0, 1.0] when measuredInPercentage is true.
129+
127130
### GetScanRegion
128131

129132
Get the scan region if one has been set.

programming/react-native/api-reference/camera-enhancer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ setScanRegion(region: undefined | null | DSRect)
241241

242242
- [`DSRect`]({{ site.dcv_react_native_api }}core/dsrect.html).
243243

244+
> [!Note]
245+
> The valid range for left, right, top, and bottom is [0.0, 1.0] when measuredInPercentage is true.
246+
244247
### setZoomFactor
245248

246249
Sets the zoom factor of the camera.

0 commit comments

Comments
 (0)