Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions programming/javascript/api-reference/camera-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This property sets a limit on how long the `CameraEnhancer` will attempt to open

> NOTE
>
> - The default value is 4000 ms.
> - The default value is 10000 ms.
> - Setting 0 means canceling the timeout or waiting indefinitely.

```typescript
Expand All @@ -79,8 +79,8 @@ cameraOpenTimeout: number;
**Code Snippet**

```javascript
// Set the timeout to 10 seconds.
cameraEnhancer.cameraOpenTimeout = 10000;
// Set the timeout to 5 seconds.
cameraEnhancer.cameraOpenTimeout = 5000;
```

## close
Expand Down Expand Up @@ -356,7 +356,7 @@ cameraEnhancer.isPaused();
Opens the currently selected camera and starts the video stream.

```typescript
open(): Promise<PlayCallbackInfo>;
open(): Promise<void | PlayCallbackInfo>;
```

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

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

**Remarks**

This method returns `Promise<void>` when operating in `singleFrameMode` in CaptureVisionBundle version 3.4.2000 & BarcodeReaderBundle version 11.4.2000.

## pause

Pauses the video stream without closing the camera.
Expand Down
15 changes: 8 additions & 7 deletions programming/javascript/api-reference/drawingstylemanager.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,17 @@ For more details, check out [Built-in DrawingStyles](./interface/drawingstyle.md
| Style Name | Style ID | Description |
| ------------------------------- | -------- | ------------------------------------------------------------------------------ |
| STYLE_BLUE_STROKE | 1 | Used by DDN for drawing found document boundaries. |
| STYLE_GREEN_STROKE | 2 | Used by DLR for highlighting found text lines. |
| STYLE_ORANGE_STROKE | 3 | Used by DBR for highlighting found barcode symbols. |
| STYLE_YELLOW_STROKE | 4 | Used as the default style for user-defined drawing layers. |
| STYLE_BLUE_STROKE_FILL | 5 | Used by DDN for drawing selected document boundaries. |
| STYLE_GREEN_STROKE_FILL | 6 | Used by DLR for highlighting selected text lines. |
| STYLE_ORANGE_STROKE_FILL | 7 | Used by DBR for highlighting selected barcode symbols. |
| STYLE_YELLOW_STROKE_FILL | 8 | Used as the style for selected drawing items on user-defined drawing layers. |
| STYLE_GREEN_STROKE | 2 | Defined but not used by default. |
| STYLE_ORANGE_STROKE | 3 | Defined but not used by default. |
| STYLE_YELLOW_STROKE | 4 | Defined but not used by default. |
| STYLE_BLUE_STROKE_FILL | 5 | Defined but not used by default. |
| STYLE_GREEN_STROKE_FILL | 6 | Used by DLR for highlighting found text lines. |
| STYLE_ORANGE_STROKE_FILL | 7 | Used by DBR for highlighting found barcode symbols. |
| STYLE_YELLOW_STROKE_FILL | 8 | Used as the default style for user-defined drawing layers. |
| STYLE_BLUE_STROKE_TRANSPARENT | 9 | Used by DDN for drawing found document boundaries that haven't been verified. |
| STYLE_GREEN_STROKE_TRANSPARENT | 10 | Used by DLR for highlighting found text lines that haven't been verified. |
| STYLE_ORANGE_STROKE_TRANSPARENT | 11 | Used by DBR for highlighting found barcode symbols that haven't been verified. |
| STYLE_YELLOW_STROKE_TRANSPARENT | 12 | Defined but not used by default. |

**Code Snippet**

Expand Down
97 changes: 3 additions & 94 deletions programming/javascript/api-reference/interface/drawingstyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ keywords: DrawingStyle, CameraEnhancer, api reference, javascript, js
needAutoGenerateSidebar: false
noTitleIndex: true
breadcrumbText: DrawingStyle
permalink: /programming/javascript/api-reference/interface/drawingstyle.html
---

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

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

## Built-in DrawingStyles

The SDK comes with 8 default Drawing styles. Their style definitions are listed below

```javascript
// DrawingStyle 1 (STYLE_BLUE_STROKE)
// Used by Dynamsoft Document Normalizer for DrawingItems in "default" state.
{
"id": 1,
"lineWidth": 4,
"fillStyle": "rgba(73, 173, 245, 0.3)",
"strokeStyle": "rgba(73, 173, 245, 1)",
"paintMode": "stroke",
"fontFamily": "consolas",
"fontSize": 40
}
// DrawingStyle 2 (STYLE_GREEN_STROKE_FILL)
// Used by Dynamsoft Label Recognizer for DrawingItems in "default" state.
{
"id": 2,
"lineWidth": 2,
"fillStyle": "rgba(73, 245, 73, 0.3)",
"strokeStyle": "rgba(73, 245, 73, 0.9)",
"paintMode": "strokeAndFill",
"fontFamily": "consolas",
"fontSize": 40
}
// DrawingStyle 3 (STYLE_ORANGE_STROKE_FILL)
// Used by Dynamsoft Barcode Reader for DrawingItems in "default" state.
{
"id": 3,
"lineWidth": 2,
"fillStyle": "rgba(254, 180, 32, 0.3)",
"strokeStyle": "rgba(254, 180, 32, 0.9)",
"paintMode": "strokeAndFill",
"fontFamily": "consolas",
"fontSize": 40
}
// DrawingStyle 4 (STYLE_YELLOW_STROKE)
// Used by custom DrawingLayers for DrawingItems in "default" state.
{
"id": 4,
"lineWidth": 2,
"fillStyle": "rgba(245, 236, 73, 0.3)",
"strokeStyle": "rgba(245, 236, 73, 1)",
"paintMode": "stroke",
"fontFamily": "consolas",
"fontSize": 40
}
// DrawingStyle 5 (STYLE_BLUE_STROKE_FILL)
// Used by Dynamsoft Document Normalizer for DrawingItems in "selected" state.
{
"id": 5,
"lineWidth": 4,
"fillStyle": "rgba(73, 173, 245, 0.3)",
"strokeStyle": "rgba(73, 173, 245, 1)",
"paintMode": "strokeAndFill",
"fontFamily": "consolas",
"fontSize": 40
}
// DrawingStyle 6 (STYLE_GREEN_STROKE_FILL)
{
"id": 6,
"lineWidth": 2,
"fillStyle": "rgba(73, 245, 73, 0.3)",
"strokeStyle": "rgba(73, 245, 73, 0.9)",
"paintMode": "strokeAndFill",
"fontFamily": "consolas",
"fontSize": 40
}
// DrawingStyle 7
// Used by Dynamsoft Barcode Reader for DrawingItems in "selected" state.
{
"id": 7,
"lineWidth": 2,
"fillStyle": "rgba(254, 180, 32, 0.3)",
"strokeStyle": "rgba(254, 180, 32, 1)",
"paintMode": "strokeAndFill",
"fontFamily": "consolas",
"fontSize": 40
}
// DrawingStyle 8 (STYLE_YELLOW_STROKE_FILL)
// Used by custom DrawingLayers for DrawingItems in "selected" state.
{
"id": 8,
"lineWidth": 2,
"fillStyle": "rgba(245, 236, 73, 0.3)",
"strokeStyle": "rgba(245, 236, 73, 1)",
"paintMode": "strokeAndFill",
"fontFamily": "consolas",
"fontSize": 40
}
```
## Predefined DrawingStyles

The SDK comes with 12 default Drawing styles. Please refer to [Predefined DrawingStyle](../drawingstylemanager.md#predefined-drawingstyle-object).
Loading