Skip to content

Commit bb3c6ba

Browse files
Merge pull request #63 from dynamsoft-docs/preview
update to internal commit 2115f5b8
2 parents 4d11858 + d4e44ca commit bb3c6ba

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

programming/android/auxiliary-api/dcecameraview.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ class CameraView
2929
| [`createDrawingLayer`](#createdrawinglayer) | Create a new `DrawingLayer`. |
3030
| [`getVisibleRegionOfVideo`](#getvisibleregionofvideo) | Get the visible region of the video streaming. |
3131
| [`setTorchButton`](#settorchbutton) | Add a torch button on your view. |
32+
| [`setCameraToggleButton`](#setcameratogglebutton) | Add a camera toggle button on your view for switching between front and back cameras. |
3233
| [`deleteUserDefinedDrawingLayer`](#deleteuserdefineddrawinglayer) | Delete the specified drawing layer. |
3334
| [`clearUserDefinedDrawingLayers`](#clearuserdefineddrawinglayers) | Clear all the user-defined drawing layers. |
3435
| [`getAllDrawingLayers`](#getalldrawinglayers) | Get all the drawing layers on the view. |
3536
| [`setScanRegionMaskStyle`](#setscanregionmaskstyle) | Set the style of the scan region mask. |
3637
| [`setTorchButtonVisible`](#settorchbuttonvisible) | Set/get the visibility of the torch button. |
3738
| [`getTorchButtonVisible`](#gettorchbuttonvisible) | Set/get the visibility of the torch button. |
39+
| [`setCameraToggleButtonVisible`](#setcameratogglebuttonvisible) | Set/get the visibility of the camera toggle button. |
40+
| [`getCameraToggleButtonVisible`](#getcameratogglebuttonvisible) | Set/get the visibility of the camera toggle button. |
3841
| [`setScanRegionMaskVisible`](#setscanregionmaskvisible) | Set/get the visibility of the scan region mask. |
3942
| [`isScanRegionMaskVisible`](#isscanregionmaskvisible) | Set/get the visibility of the scan region mask. |
4043
| [`setScanLaserVisible`](#setscanlaservisible) | Set the visibility of the scan laser. |
@@ -142,6 +145,46 @@ boolean getTorchButtonVisible();
142145

143146
A boolean value that indicate the torch button is visible.
144147

148+
### setCameraToggleButton
149+
150+
Add a camera toggle button on your view for switching between front and back camera.
151+
152+
```java
153+
void setCameraToggleButton(Point cameraToggleButtonPosition);
154+
void setCameraToggleButton(Point cameraToggleButtonPosition, int width, int height, Drawable cameraToggleImage);
155+
```
156+
157+
**Parameters**
158+
159+
`cameraToggleButtonPosition`: Set the top-left point of the camera toggle button.
160+
`width`: Set the width of the camera toggle button.
161+
`height`: Set the height of the camera toggle button.
162+
`cameraToggleImage`: The camera toggle button image that you want to display.
163+
164+
### setCameraToggleButtonVisible
165+
166+
Set the visibility of the camera toggle button.
167+
168+
```java
169+
void setCameraToggleButtonVisible(boolean isCameraToggleButtonVisible);
170+
```
171+
172+
**Parameters**
173+
174+
`isCameraToggleButtonVisible`: A boolean value that indicates whether the camera toggle button is visible.
175+
176+
### getCameraToggleButtonVisible
177+
178+
Get the visibility of the camera toggle button.
179+
180+
```java
181+
boolean getCameraToggleButtonVisible();
182+
```
183+
184+
**Return Value**
185+
186+
A boolean value that indicates whether the camera toggle button is visible.
187+
145188
### deleteUserDefinedDrawingLayer
146189

147190
Delete the specified drawing layer.

programming/ios/auxiliary-api/dcecameraview.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class CameraView: UIView {}
3838
| Attributes | Type | Description |
3939
| ---------- | ---- | ----------- |
4040
| [`torchButtonVisible`](#torchbuttonvisible) | *BOOL* | Set/get the visibility of the torch button. |
41+
| [`cameraToggleButtonVisible`](#cameratogglebuttonvisible) | *BOOL* | Set/get the visibility of the camera toggle button. |
4142
| [`scanRegionMaskVisible`](#scanregionmaskvisible) | *BOOL* | Set/get the visibility of the scan region mask. |
4243
| [`scanLaserVisible`](#scanlaservisible) | *BOOL* | Set/get the visibility of the scan laser. |
4344
| [`tipConfig`](#tipconfig) | *DSTipConfig* | Set/get the tip configurations. |
@@ -52,6 +53,7 @@ class CameraView: UIView {}
5253
| [`createDrawingLayer`](#createdrawinglayer) | Create a new DrawingLayer. |
5354
| [`getVisibleRegionOfVideo`](#getvisibleregionofvideo) | Get the visible region of the video streaming. |
5455
| [`setTorchButtonWithFrame`](#settorchbuttonwithframe) | Add a torch button on your view. |
56+
| [`setCameraToggleButtonWithFrame`](#setcameratogglebuttonwithframe) | Add a camera toggle button on your view for switching between front and back camera. |
5557
| [`deleteUserDefinedDrawingLayer`](#deleteuserdefineddrawinglayer) | Delete the specified drawing layer. |
5658
| [`clearUserDefinedDrawingLayers`](#clearuserdefineddrawinglayers) | Clear all the user-defined drawing layers. |
5759
| [`getAllDrawingLayers`](#getalldrawinglayers) | Get all the drawing layers on the view. |
@@ -76,6 +78,23 @@ Set/get the visibility of the torch button.
7678
var torchButtonVisible: BOOL { get set }
7779
```
7880

81+
### cameraToggleButtonVisible
82+
83+
Set/get the visibility of the camera toggle button.
84+
85+
<div class="sample-code-prefix"></div>
86+
>- Objective-C
87+
>- Swift
88+
>
89+
>1.
90+
```objc
91+
@property (assign, nonatomic) BOOL cameraToggleButtonVisible;
92+
```
93+
2.
94+
```swift
95+
var cameraToggleButtonVisible: BOOL { get set }
96+
```
97+
7998
### scanRegionMaskVisible
8099

81100
Set/get the visibility of the scan region mask.
@@ -319,6 +338,29 @@ func setTorchButton(_ frame: CGRect, torchOnImage: UIImage, torchOffImage: UIIma
319338
`torchOnImage`: The torch button image that you want to display when the torch is on.
320339
`torchOffImage`: The torch button image that you want to display when the torch is off.
321340

341+
### setCameraToggleButtonWithFrame
342+
343+
Add a camera toggle button on your view for switching between front and back camera.
344+
345+
<div class="sample-code-prefix"></div>
346+
>- Objective-C
347+
>- Swift
348+
>
349+
>1.
350+
```objc
351+
- (void)setCameraToggleButtonWithFrame:(CGRect)frame
352+
cameraToggleImage:(UIImage* _Nullable)cameraToggleImage;
353+
```
354+
2.
355+
```swift
356+
func setCameraToggleButton(_ frame: CGRect, cameraToggleImage: UIImage)
357+
```
358+
359+
**Parameters**
360+
361+
`frame`: The place that you want to locate the camera toggle button.
362+
`cameraToggleImage`: The camera toggle button image.
363+
322364
### deleteUserDefinedDrawingLayer
323365

324366
Delete the specified drawing layer.

0 commit comments

Comments
 (0)