Skip to content

Commit fa1abd3

Browse files
Merge pull request #75 from dynamsoft-docs/preview
Preview
2 parents fc7de47 + 95062de commit fa1abd3

3 files changed

Lines changed: 19 additions & 105 deletions

File tree

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This property sets a limit on how long the `CameraEnhancer` will attempt to open
6969

7070
> NOTE
7171
>
72-
> - The default value is 4000 ms.
72+
> - The default value is 10000 ms.
7373
> - Setting 0 means canceling the timeout or waiting indefinitely.
7474
7575
```typescript
@@ -79,8 +79,8 @@ cameraOpenTimeout: number;
7979
**Code Snippet**
8080

8181
```javascript
82-
// Set the timeout to 10 seconds.
83-
cameraEnhancer.cameraOpenTimeout = 10000;
82+
// Set the timeout to 5 seconds.
83+
cameraEnhancer.cameraOpenTimeout = 5000;
8484
```
8585

8686
## close
@@ -356,7 +356,7 @@ cameraEnhancer.isPaused();
356356
Opens the currently selected camera and starts the video stream.
357357

358358
```typescript
359-
open(): Promise<PlayCallbackInfo>;
359+
open(): Promise<void | PlayCallbackInfo>;
360360
```
361361

362362
**Parameters**
@@ -377,6 +377,10 @@ await cameraEnhancer.open();
377377

378378
[PlayCallbackInfo](./interface/playcallbackinfo.md)
379379

380+
**Remarks**
381+
382+
This method returns `Promise<void>` when operating in `singleFrameMode` in CaptureVisionBundle version 3.4.2000 & BarcodeReaderBundle version 11.4.2000.
383+
380384
## pause
381385

382386
Pauses the video stream without closing the camera.

programming/javascript/api-reference/drawingstylemanager.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,17 @@ For more details, check out [Built-in DrawingStyles](./interface/drawingstyle.md
179179
| Style Name | Style ID | Description |
180180
| ------------------------------- | -------- | ------------------------------------------------------------------------------ |
181181
| STYLE_BLUE_STROKE | 1 | Used by DDN for drawing found document boundaries. |
182-
| STYLE_GREEN_STROKE | 2 | Used by DLR for highlighting found text lines. |
183-
| STYLE_ORANGE_STROKE | 3 | Used by DBR for highlighting found barcode symbols. |
184-
| STYLE_YELLOW_STROKE | 4 | Used as the default style for user-defined drawing layers. |
185-
| STYLE_BLUE_STROKE_FILL | 5 | Used by DDN for drawing selected document boundaries. |
186-
| STYLE_GREEN_STROKE_FILL | 6 | Used by DLR for highlighting selected text lines. |
187-
| STYLE_ORANGE_STROKE_FILL | 7 | Used by DBR for highlighting selected barcode symbols. |
188-
| STYLE_YELLOW_STROKE_FILL | 8 | Used as the style for selected drawing items on user-defined drawing layers. |
182+
| STYLE_GREEN_STROKE | 2 | Defined but not used by default. |
183+
| STYLE_ORANGE_STROKE | 3 | Defined but not used by default. |
184+
| STYLE_YELLOW_STROKE | 4 | Defined but not used by default. |
185+
| STYLE_BLUE_STROKE_FILL | 5 | Defined but not used by default. |
186+
| STYLE_GREEN_STROKE_FILL | 6 | Used by DLR for highlighting found text lines. |
187+
| STYLE_ORANGE_STROKE_FILL | 7 | Used by DBR for highlighting found barcode symbols. |
188+
| STYLE_YELLOW_STROKE_FILL | 8 | Used as the default style for user-defined drawing layers. |
189189
| STYLE_BLUE_STROKE_TRANSPARENT | 9 | Used by DDN for drawing found document boundaries that haven't been verified. |
190190
| STYLE_GREEN_STROKE_TRANSPARENT | 10 | Used by DLR for highlighting found text lines that haven't been verified. |
191191
| STYLE_ORANGE_STROKE_TRANSPARENT | 11 | Used by DBR for highlighting found barcode symbols that haven't been verified. |
192+
| STYLE_YELLOW_STROKE_TRANSPARENT | 12 | Defined but not used by default. |
192193

193194
**Code Snippet**
194195

programming/javascript/api-reference/interface/drawingstyle.md

Lines changed: 3 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ keywords: DrawingStyle, CameraEnhancer, api reference, javascript, js
66
needAutoGenerateSidebar: false
77
noTitleIndex: true
88
breadcrumbText: DrawingStyle
9-
permalink: /programming/javascript/api-reference/interface/drawingstyle.html
109
---
1110

1211
# DrawingStyle
@@ -55,96 +54,6 @@ The mode of painting (e.g., "fill", "stroke" or "strokeAndFill"). If not specifi
5554

5655
The stroke color and opacity in rgba format. If not specified, the default is "rgba(245, 236, 73, 1)".
5756

58-
## Built-in DrawingStyles
59-
60-
The SDK comes with 8 default Drawing styles. Their style definitions are listed below
61-
62-
```javascript
63-
// DrawingStyle 1 (STYLE_BLUE_STROKE)
64-
// Used by Dynamsoft Document Normalizer for DrawingItems in "default" state.
65-
{
66-
"id": 1,
67-
"lineWidth": 4,
68-
"fillStyle": "rgba(73, 173, 245, 0.3)",
69-
"strokeStyle": "rgba(73, 173, 245, 1)",
70-
"paintMode": "stroke",
71-
"fontFamily": "consolas",
72-
"fontSize": 40
73-
}
74-
// DrawingStyle 2 (STYLE_GREEN_STROKE_FILL)
75-
// Used by Dynamsoft Label Recognizer for DrawingItems in "default" state.
76-
{
77-
"id": 2,
78-
"lineWidth": 2,
79-
"fillStyle": "rgba(73, 245, 73, 0.3)",
80-
"strokeStyle": "rgba(73, 245, 73, 0.9)",
81-
"paintMode": "strokeAndFill",
82-
"fontFamily": "consolas",
83-
"fontSize": 40
84-
}
85-
// DrawingStyle 3 (STYLE_ORANGE_STROKE_FILL)
86-
// Used by Dynamsoft Barcode Reader for DrawingItems in "default" state.
87-
{
88-
"id": 3,
89-
"lineWidth": 2,
90-
"fillStyle": "rgba(254, 180, 32, 0.3)",
91-
"strokeStyle": "rgba(254, 180, 32, 0.9)",
92-
"paintMode": "strokeAndFill",
93-
"fontFamily": "consolas",
94-
"fontSize": 40
95-
}
96-
// DrawingStyle 4 (STYLE_YELLOW_STROKE)
97-
// Used by custom DrawingLayers for DrawingItems in "default" state.
98-
{
99-
"id": 4,
100-
"lineWidth": 2,
101-
"fillStyle": "rgba(245, 236, 73, 0.3)",
102-
"strokeStyle": "rgba(245, 236, 73, 1)",
103-
"paintMode": "stroke",
104-
"fontFamily": "consolas",
105-
"fontSize": 40
106-
}
107-
// DrawingStyle 5 (STYLE_BLUE_STROKE_FILL)
108-
// Used by Dynamsoft Document Normalizer for DrawingItems in "selected" state.
109-
{
110-
"id": 5,
111-
"lineWidth": 4,
112-
"fillStyle": "rgba(73, 173, 245, 0.3)",
113-
"strokeStyle": "rgba(73, 173, 245, 1)",
114-
"paintMode": "strokeAndFill",
115-
"fontFamily": "consolas",
116-
"fontSize": 40
117-
}
118-
// DrawingStyle 6 (STYLE_GREEN_STROKE_FILL)
119-
{
120-
"id": 6,
121-
"lineWidth": 2,
122-
"fillStyle": "rgba(73, 245, 73, 0.3)",
123-
"strokeStyle": "rgba(73, 245, 73, 0.9)",
124-
"paintMode": "strokeAndFill",
125-
"fontFamily": "consolas",
126-
"fontSize": 40
127-
}
128-
// DrawingStyle 7
129-
// Used by Dynamsoft Barcode Reader for DrawingItems in "selected" state.
130-
{
131-
"id": 7,
132-
"lineWidth": 2,
133-
"fillStyle": "rgba(254, 180, 32, 0.3)",
134-
"strokeStyle": "rgba(254, 180, 32, 1)",
135-
"paintMode": "strokeAndFill",
136-
"fontFamily": "consolas",
137-
"fontSize": 40
138-
}
139-
// DrawingStyle 8 (STYLE_YELLOW_STROKE_FILL)
140-
// Used by custom DrawingLayers for DrawingItems in "selected" state.
141-
{
142-
"id": 8,
143-
"lineWidth": 2,
144-
"fillStyle": "rgba(245, 236, 73, 0.3)",
145-
"strokeStyle": "rgba(245, 236, 73, 1)",
146-
"paintMode": "strokeAndFill",
147-
"fontFamily": "consolas",
148-
"fontSize": 40
149-
}
150-
```
57+
## Predefined DrawingStyles
58+
59+
The SDK comes with 12 default Drawing styles. Please refer to [Predefined DrawingStyle](../drawingstylemanager.md#predefined-drawingstyle-object).

0 commit comments

Comments
 (0)