Skip to content

Commit e0ec2f6

Browse files
update to internal commit db5284c7
1 parent a7c138c commit e0ec2f6

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ repository: dynamsoft-docs/camera-enhancer-docs-js
33
docFullPath: https://www.dynamsoft.com/camera-enhancer/docs/web/
44
firstLevelUrl: /camera-enhancer/docs/web
55
docHomePage: /camera-enhancer/docs/introduction/
6+
needSearchIndex: true
7+
searchNeedFilter: true
68

79
productUrl: https://www.dynamsoft.com/camera-enhancer/overview/
810
productName: Dynamsoft Camera Enhancer

programming/javascript/api-reference/camera-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ cameraEnhancer.setZoom({
11211121

11221122
Turns off the camera's torch (flashlight) mode.
11231123

1124-
> This method should be called when the camera is turned on. Note that it only works with Chromium-based browsers such as Edge and Chrome on Windows or Android. Other browsers such as Firefox or Safari are not supported. Note that all browsers on iOS (including Chrome) use WebKit as the rendering engine and are not supported.
1124+
> This method should be called when the camera is turned on. Note that it only works with Chromium-based browsers such as Edge and Chrome on Windows or Android. Other browsers such as Firefox or Safari are not supported.
11251125
11261126
```typescript
11271127
turnOffTorch(): Promise<void>;

programming/javascript/api-reference/ui.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,38 @@ permalink: /programming/javascript/api-reference/ui.html
1212

1313
# CameraEnhancer - UI
1414

15-
| Name | Description |
16-
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
17-
| [convertToPageCoordinates](#convertToPageCoordinates) | Converts coordinates from the video's coordinate system to coordinates relative to the whole page. |
18-
| [convertToClientCoordinates](#convertToClientCoordinates) | Converts coordinates from the video's coordinate system to coordinates relative to the viewport. |
19-
| [setCameraView](#setCameraView) | Sets the `CameraView` instance to be used with the `CameraEnhancer`. |
20-
| [getCameraView](#getCameraView) | Retrieves the current `CameraView` instance associated with the `CameraEnhancer`. |
21-
| [getVideoEl](#getVideoEl) | Retrieves the HTMLVideoElement used by the `CameraEnhancer` for displaying the camera feed. |
15+
| Name | Description |
16+
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
17+
| [convertToScanRegionCoordinates](#convertToScanRegionCoordinates) | Converts coordinates from the video's coordinate system to coordinates relative to the scan region. |
18+
| [convertToPageCoordinates](#convertToPageCoordinates) | Converts coordinates from the video's coordinate system to coordinates relative to the whole page. |
19+
| [convertToClientCoordinates](#convertToClientCoordinates) | Converts coordinates from the video's coordinate system to coordinates relative to the viewport. |
20+
| [setCameraView](#setCameraView) | Sets the `CameraView` instance to be used with the `CameraEnhancer`. |
21+
| [getCameraView](#getCameraView) | Retrieves the current `CameraView` instance associated with the `CameraEnhancer`. |
22+
| [getVideoEl](#getVideoEl) | Retrieves the HTMLVideoElement used by the `CameraEnhancer` for displaying the camera feed. |
23+
24+
## convertToScanRegionCoordinates
25+
26+
Converts coordinates from the video's coordinate system to coordinates relative to the scan region.
27+
28+
This is useful for overlaying HTML elements on top of specific points in the video, aligning with the page's layout.
29+
30+
```typescript
31+
convertToScanRegionCoordinates(point: Point): Point;
32+
```
33+
34+
**Parameters**
35+
36+
`point`: a `Point` object representing the x and y coordinates within the video's coordinate system.
37+
38+
**Return value**
39+
40+
A `Point` object representing the converted x and y coordinates relative to the scan region.
41+
42+
**Code Snippet**
43+
44+
```javascript
45+
cameraEnhancer.convertToScanRegionCoordinates({x: 0, y: 0});
46+
```
2247

2348
## convertToPageCoordinates
2449

0 commit comments

Comments
 (0)