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
43 changes: 43 additions & 0 deletions programming/android/auxiliary-api/dcecameraview.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ class CameraView
| [`createDrawingLayer`](#createdrawinglayer) | Create a new `DrawingLayer`. |
| [`getVisibleRegionOfVideo`](#getvisibleregionofvideo) | Get the visible region of the video streaming. |
| [`setTorchButton`](#settorchbutton) | Add a torch button on your view. |
| [`setCameraToggleButton`](#setcameratogglebutton) | Add a camera toggle button on your view for switching between front and back cameras. |
| [`deleteUserDefinedDrawingLayer`](#deleteuserdefineddrawinglayer) | Delete the specified drawing layer. |
| [`clearUserDefinedDrawingLayers`](#clearuserdefineddrawinglayers) | Clear all the user-defined drawing layers. |
| [`getAllDrawingLayers`](#getalldrawinglayers) | Get all the drawing layers on the view. |
| [`setScanRegionMaskStyle`](#setscanregionmaskstyle) | Set the style of the scan region mask. |
| [`setTorchButtonVisible`](#settorchbuttonvisible) | Set/get the visibility of the torch button. |
| [`getTorchButtonVisible`](#gettorchbuttonvisible) | Set/get the visibility of the torch button. |
| [`setCameraToggleButtonVisible`](#setcameratogglebuttonvisible) | Set/get the visibility of the camera toggle button. |
| [`getCameraToggleButtonVisible`](#getcameratogglebuttonvisible) | Set/get the visibility of the camera toggle button. |
| [`setScanRegionMaskVisible`](#setscanregionmaskvisible) | Set/get the visibility of the scan region mask. |
| [`isScanRegionMaskVisible`](#isscanregionmaskvisible) | Set/get the visibility of the scan region mask. |
| [`setScanLaserVisible`](#setscanlaservisible) | Set the visibility of the scan laser. |
Expand Down Expand Up @@ -142,6 +145,46 @@ boolean getTorchButtonVisible();

A boolean value that indicate the torch button is visible.

### setCameraToggleButton

Add a camera toggle button on your view for switching between front and back camera.

```java
void setCameraToggleButton(Point cameraToggleButtonPosition);
void setCameraToggleButton(Point cameraToggleButtonPosition, int width, int height, Drawable cameraToggleImage);
```

**Parameters**

`cameraToggleButtonPosition`: Set the top-left point of the camera toggle button.
`width`: Set the width of the camera toggle button.
`height`: Set the height of the camera toggle button.
`cameraToggleImage`: The camera toggle button image that you want to display.

### setCameraToggleButtonVisible

Set the visibility of the camera toggle button.

```java
void setCameraToggleButtonVisible(boolean isCameraToggleButtonVisible);
```

**Parameters**

`isCameraToggleButtonVisible`: A boolean value that indicates whether the camera toggle button is visible.

### getCameraToggleButtonVisible

Get the visibility of the camera toggle button.

```java
boolean getCameraToggleButtonVisible();
```

**Return Value**

A boolean value that indicates whether the camera toggle button is visible.

### deleteUserDefinedDrawingLayer

Delete the specified drawing layer.
Expand Down
42 changes: 42 additions & 0 deletions programming/ios/auxiliary-api/dcecameraview.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class CameraView: UIView {}
| Attributes | Type | Description |
| ---------- | ---- | ----------- |
| [`torchButtonVisible`](#torchbuttonvisible) | *BOOL* | Set/get the visibility of the torch button. |
| [`cameraToggleButtonVisible`](#cameratogglebuttonvisible) | *BOOL* | Set/get the visibility of the camera toggle button. |
| [`scanRegionMaskVisible`](#scanregionmaskvisible) | *BOOL* | Set/get the visibility of the scan region mask. |
| [`scanLaserVisible`](#scanlaservisible) | *BOOL* | Set/get the visibility of the scan laser. |
| [`tipConfig`](#tipconfig) | *DSTipConfig* | Set/get the tip configurations. |
Expand All @@ -52,6 +53,7 @@ class CameraView: UIView {}
| [`createDrawingLayer`](#createdrawinglayer) | Create a new DrawingLayer. |
| [`getVisibleRegionOfVideo`](#getvisibleregionofvideo) | Get the visible region of the video streaming. |
| [`setTorchButtonWithFrame`](#settorchbuttonwithframe) | Add a torch button on your view. |
| [`setCameraToggleButtonWithFrame`](#setcameratogglebuttonwithframe) | Add a camera toggle button on your view for switching between front and back camera. |
| [`deleteUserDefinedDrawingLayer`](#deleteuserdefineddrawinglayer) | Delete the specified drawing layer. |
| [`clearUserDefinedDrawingLayers`](#clearuserdefineddrawinglayers) | Clear all the user-defined drawing layers. |
| [`getAllDrawingLayers`](#getalldrawinglayers) | Get all the drawing layers on the view. |
Expand All @@ -76,6 +78,23 @@ Set/get the visibility of the torch button.
var torchButtonVisible: BOOL { get set }
```

### cameraToggleButtonVisible

Set/get the visibility of the camera toggle button.

<div class="sample-code-prefix"></div>
>- Objective-C
>- Swift
>
>1.
```objc
@property (assign, nonatomic) BOOL cameraToggleButtonVisible;
```
2.
```swift
var cameraToggleButtonVisible: BOOL { get set }
```

### scanRegionMaskVisible

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

### setCameraToggleButtonWithFrame

Add a camera toggle button on your view for switching between front and back camera.

<div class="sample-code-prefix"></div>
>- Objective-C
>- Swift
>
>1.
```objc
- (void)setCameraToggleButtonWithFrame:(CGRect)frame
cameraToggleImage:(UIImage* _Nullable)cameraToggleImage;
```
2.
```swift
func setCameraToggleButton(_ frame: CGRect, cameraToggleImage: UIImage)
```

**Parameters**

`frame`: The place that you want to locate the camera toggle button.
`cameraToggleImage`: The camera toggle button image.

### deleteUserDefinedDrawingLayer

Delete the specified drawing layer.
Expand Down