Table of contents

DSRect

The DSRect class is used to define a rectangular region. This is typically used by the CameraEnhancer class to set a scan region.

Definition

Assembly: dynamsoft_capture_vision_flutter

class DSRect

Properties

left

The left edge of the rectangle, set in pixels or as a percentage of the width of the frame.

double left;

top

The top edge of the rectangle, set in pixels or as a percentage of the length of the frame.

double top;

The right edge of the rectangle, set in pixels or as a percentage of the width of the frame.

double right;

bottom

The bottom edge of the rectangle, set in pixels or as a percentage of the length of the frame.

double bottom;

measuredInPercentage

Determines whether the rectangle’s dimensions are measured as a percentage of the total image/frame dimensions or not.

bool measuredInPercentage;

Code Snippet

final scanRegion = DSRect(left: 0.15, top: 0.3, right: 0.85, bottom: 0.7, measuredInPercentage: true);
await _camera.setScanRegion(scanRegion);

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: