Table of contents

ImageDrawer

The ImageDrawer class provides API to render geometric shapes such as quadrilaterals on images. This class comes in handy when you want to add annotations to an image obtained from a CapturedResult or from the IntermediateResultManager.

Definition

Assembly: dynamsoft-capture-vision-react-native

class ImageDrawer

Methods

Method Description
drawOnImage Draws quadrilaterals on the image with the specified style parameters.

drawOnImage

Draws quadrilaterals on the image with the specified style parameters.

drawOnImage(imageData: ImageData | null | undefined, quads: Quadrilateral[] | null | undefined, colour: number | ColorValue, thickness: number): ImageData | null | undefined

Parameters

imageData: The source image to draw on.

quads: List of Quadrilateral objects to render onto the image.

colour: ARGB colour value (0xAARRGGBB format)

thickness: The line thickness in pixels.

Returns

An ImageData object that represents the new image with the rendered shapes.

This page is compatible for: