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
13 changes: 13 additions & 0 deletions programming/maui/api-reference/camera-enhancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class CameraEnhancer : ImageSourceAdapter
| [`GetFocusMode`](#getfocusmode) | Set the focus point of interest and trigger an one-off auto-focus. After the focus, you can either lock the focalngth or keep the continuous auto focus enabled by configuring the subsequent focus mode. |
| [`TurnOnTorch`](#turnontorch) | Turn on the torch. |
| [`TurnOffTorch`](#turnofftorch) | Turn off the torch. |
| [`TakePhoto`](#takephoto) | Take a photo. |

The following methods are inherited from superclass [`ImageSourceAdapter`]({{ site.dcv_maui_api }}core/image-source-adapter.html)

Expand Down Expand Up @@ -251,3 +252,15 @@ Turn off the torch.
```csharp
void TurnOffTorch();
```

### TakePhoto

Take a photo.

```csharp
public partial void TakePhoto(Action<byte[]?> listener);
```

**Parameters**

`listener`: A callback to receive the photo data.
86 changes: 86 additions & 0 deletions programming/maui/api-reference/camera-toggle-button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
layout: default-layout
title: CameraToggleButton Class - Dynamsoft Capture Vision MAUI Edition
description: CameraToggleButton class of DCV MAUI edition defines a camera toggle button with its location, size and image.
keywords: camera toggle button, camera toggle image
needGenerateH3Content: true
needAutoGenerateSidebar: true
noTitleIndex: true
---

# CameraToggleButton

The CameraToggleButton class defines a camera toggle button with its location, size and image.

## Definition

*Namespace:* Dynamsoft.CameraEnhancer.Maui

*Assembly:* Dynamsoft.CameraEnhancer.Maui

```java
class CameraToggleButton
```

## Properties & Methods

| Property | Type | Description |
|--------- |------|-------------|
| [`X`](#x) | *double* | The x-coordinate of the camera toggle button. |
| [`Y`](#y) | *double* | The y-coordinate of the camera toggle button. |
| [`Width`](#width) | *double* | The width of the camera toggle button. |
| [`Height`](#height) | *double* | The height of the camera toggle button. |
| [`CameraToggleImageSource`](#cameratoggleimagesource) | *ImageSource* | The image source of the camera toggle button. |

| Method | Description |
|------- |-------------|
| [`CameraToggleButton`](#cameratogglebutton-1) | The constructors. |

### X

The x-coordinate of the camera toggle button.

```csharp
double X { get; set; }
```

### Y

The y-coordinate of the camera toggle button.

```csharp
double Y { get; set; }
```

### Width

The width of the camera toggle button.

```csharp
double Width { get; set; }
```

### Height

The height of the camera toggle button.

```csharp
double Height { get; set; }
```

### CameraToggleImageSource

The image source of the camera toggle button.

```csharp
ImageSource? CameraToggleImageSource { get; set; }
```

### CameraToggleButton

The constructors.

```csharp
CameraToggleButton();
CameraToggleButton(double x, double y, double width, double height, ImageSource? cameraToggleImageSource);
```
18 changes: 18 additions & 0 deletions programming/maui/api-reference/camera-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class CameraView : View

| Property | Type | Description |
|--------- | ---- |-------------|
| [`CameraToggleButton`](#cameratogglebutton) | *CameraToggleButton* | The property that defines a camera toggle button. User can click the button to switch between the front and back forward cameras. |
| [`CameraToggleButtonVisible`](#cameratogglebuttonvisible) | *bool* | The property that defines whether the camera toggle button is visible. |
| [`TorchButton`](#torchbutton) | *TorchButton* | The property that defines a torch button. User can click the button to turn on/off the torch. |
| [`TorchButtonVisible`](#torchbuttonvisible) | *bool* | The property that defines whether the torch button is visible. |
| [`ScanRegionMaskVisible`](#scanregionmaskvisible) | *bool* | The property that defines whether the scan region mask is visible. |
Expand Down Expand Up @@ -60,6 +62,22 @@ DrawingLayer GetDrawingLayer(EnumDrawingLayerId id);

The `DrawingLayer` instance.

### CameraToggleButton

The property that defines a torch button. User can click the button to switch between the front and back forward cameras. View [`CameraToggleButton`]({{ site.dce_maui_api }}camera-toggle-button.html) class for how more information about how to configure the camera toggle button.

```csharp
CameraToggleButton CameraToggleButton { get; set; }
```

### CameraToggleButtonVisible

The property that defines whether the camera toggle button is visible.

```csharp
bool CameraToggleButtonVisible { get; set; }
```

### TorchButton

The property that defines a torch button. User can click the button to turn on/off the torch. View [`TorchButton`]({{ site.dce_maui_api }}torch-button.html) class for how more information about how to configure the torch button.
Expand Down
15 changes: 14 additions & 1 deletion programming/maui/api-reference/torch-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The TorchButton class defines a torch button with its location, size and image.
class TorchButton
```

## Properties
## Properties & Methods

| Property | Type | Description |
|--------- |------|-------------|
Expand All @@ -33,6 +33,10 @@ class TorchButton
| [`TorchOnImageSource`](#torchonimagesource) | *ImageSource* | The image source of the torch button when the torch is on. |
| [`TorchOffImageSource`](#torchoffimagesource) | *ImageSource* | The image source of the torch button when the torch is off. |

| Method | Description |
|------- |-------------|
| [`TorchButton`](#torchbutton-1) | The constructors. |

### X

The x-coordinate of the torch button.
Expand Down Expand Up @@ -80,3 +84,12 @@ The image source of the torch button when the torch is off.
```csharp
ImageSource? TorchOffImageSource { get; set; }
```

### TorchButton

The constructors.

```csharp
TorchButton();
TorchButton(double x, double y, double width, double height, ImageSource? onImageSource, ImageSource? offImageSource);
```