Resource Base
Table of contents

ImageEditorView

ImageEditorView is a widget that allows users to add interactable UI elements on the view.

Definition

Assembly: dynamsoft-capture-vision-react-native

class ImageEditorView extends Component<ImageEditorViewNativeProps, any>

Methods

Method Description
setOriginalImage The initial image to display in the editor when created.
getSelectedQuad Pre-populated drawing quadrilaterals organized by layer.
setQuads Callback invoked when the native platform view is successfully created.

getSelectedQuad

Retrieves the currently selected quadrilateral from the editor.

getSelectedQuad(): Promise<null | Quadrilateral>

Returns

A promise that resolves the currently selected quadrilateral.

setOriginalImage

Sets the original image in the native image editor.

setOriginalImage(imageData: ImageData): void

Parameters

imageData: The ImageData Object to be set as the original image.

setQuads

Updates the quadrilaterals in the editor for a specific drawing layer.

setQuads(
    quads: undefined | null | Quadrilateral[],
    layerId: number,
): Promise<void>

Parameters

quads: The Quadrilaterals to set, or null/undefined to clear them. The coordinate base of the point is “image”.

layerId: The ID of the drawing layer to update.

This page is compatible for: