Torch Switch Control

Defined under the namespace Scandit.Datacapture.Core.Ui

TorchSwitchControl
class TorchSwitchControl : Control

Added in version 6.8.0

Control that allows to toggle the torch on and off. The torch switch control hides itself automatically in case the active frame source doesn’t have a torch.

You can add this control to a view by calling DataCaptureView.addControl().

torchOffImage
torchOffImage: string | null

Added in version 6.8.0

Sets the image encoded as a base64 string to use for the control button when the torch is off.

torchOffPressedImage
torchOffPressedImage: string | null

Added in version 6.8.0

Sets the image encoded as a base64 string to use for the control button when the torch is off and the button is pressed.

torchOnImage
torchOnImage: string | null

Added in version 6.8.0

Sets the image encoded as a base64 string to use for the control button when the torch is on.

torchOnPressedImage
torchOnPressedImage: string | null

Added in version 6.8.0

Sets the image encoded as a base64 string to use for the control button when the torch is on and the button is pressed.

setTorchOffImage(resource)
setTorchOffImage(resource: string): void

Added in version 6.23.0

Sets the resource to use for the control button image when the torch is off.

setTorchOffPressedImage(resource)
setTorchOffPressedImage(resource: string): void

Added in version 6.23.0

Sets the resource to use for the control button image when the torch is off and the button is pressed.

setTorchOnImage(resource)
setTorchOnImage(resource: string): void

Added in version 6.23.0

Sets the resource to use for the control button image when the torch is on.

setTorchOnPressedImage(resource)
setTorchOnPressedImage(resource: string): void

Added in version 6.23.0

Sets the resource to use for the control button image when the torch is on and the button is pressed.

setImageResource(resource)
setImageResource(resource: string): void

Added in version 6.23.0

Sets the image to be used for all the the states of this control.