dynamsoft-capture-vision-react-native
Version:
The Dynamsoft Capture Vision React Native SDK provides a wrapper for building barcode scanning, document scanning and MRZ scanning applications with React Native.
72 lines (65 loc) • 2.7 kB
text/typescript
import type {HostComponent, ViewProps} from "react-native";
import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
import type {Int32} from "react-native/Libraries/Types/CodegenTypes";
import type {DecodedBarcodesResult} from "../dbr";
import type {RecognizedTextLinesResult} from "../dlr";
import type {ProcessedDocumentResult} from "../ddn";
export interface CameraViewNativeProps extends ViewProps {
/**
* CameraView has three default drawing layers corresponding to
* {@link EnumDrawingLayerId.DBR_LAYER_ID}/{@link EnumDrawingLayerId.DLR_LAYER_ID}/{@link EnumDrawingLayerId.DDN_LAYER_ID},
* they will draw the corresponding {@link DecodedBarcodesResult}/{@link RecognizedTextLinesResult}/{@link ProcessedDocumentResult} on the camera preview.
* If visibleLayerIds is undefined, all layer will be visible.
* If defined, only the DrawingLayer corresponding to the layerId in the array will be visible.
*
* @see {@link EnumDrawingLayerId}
* */
visibleLayerIds?: number[]
/**
* Set the visibility of the scan region mask.
* Only available when set a scan region to CameraEnhancer.
* Default is true.
* */
scanRegionMaskVisible?: boolean
/**
* Set the visibility of the scan laser.
* Only available when set a scan region to CameraEnhancer.
* Default is false.
* */
scanLaserVisible?: boolean
/**
* Add a torch button that can control the torch on your view.
* If you are using enhanced feature - {@link EnumEnhancedFeatures.EF_SMART_TORCH},
* the style of this torch button will be applied to the smart torch as well.
* */
torchButton?: {
/**
* Set the top-left point and width and height of the torch button.(All by px)
* */
location?: {
x?: Int32;
y?: Int32;
width?: Int32;
height?: Int32;
}
/**
* Set the visibility of the torch button. Default is false.
* */
visible?: boolean;
/**
* The torch button image that you want to display when the torch is on.
* */
torchOnImageBase64?: string;
/**
* The torch button image that you want to display when the torch is off.
* */
torchOffImageBase64?: string;
};
/**
* Set the visibility of the torch button. Default is false.
* */
torchButtonVisible?: boolean
}
export default codegenNativeComponent<CameraViewNativeProps>(
"DynamsoftCameraView"
) as HostComponent<CameraViewNativeProps>;