Rectangular Location Selection#

Defined under the namespace Scandit.Datacapture.Core

RectangularLocationSelection#
class RectangularLocationSelection : LocationSelection

Added in version 6.1.0

Location selection for selecting codes inside a rectangle centered on the point of interest. Any object that is fully inside the rectangle is returned, objects that are partially or entirely outside of the rectangle are filtered out. See Scan Area Guide for an in-depth explanation of location selection.

withSize(size)#
static withSize(size: SizeWithUnit): RectangularLocationSelection

Added in version 6.1.0

Creates a new rectangular location selection instance with the specified horizontal and vertical size. When the unit is relative (unit in either x or y is MeasureUnit.Fraction) the size is computed relative to the view size minus the scan area margins.

withWidthAndAspectRatio(width, heightToWidthAspectRatio)#
static withWidthAndAspectRatio(width: NumberWithUnit,
        heightToWidthAspectRatio: number): RectangularLocationSelection

Added in version 6.1.0

Creates a new rectangular location selection instance with the specified width and computes the height based on the provided height/width aspect ratio. When the unit is relative (MeasureUnit.Fraction), the width is computed relative to the view size minus the scan area margins.

withHeightAndAspectRatio(height, widthToHeightAspectRatio)#
static withHeightAndAspectRatio(height: NumberWithUnit,
        widthToHeightAspectRatio: number): RectangularLocationSelection

Added in version 6.1.0

Creates a new rectangular location selection instance with the specified height and computes the width based on the provided width/height aspect ratio. When the unit is relative (MeasureUnit.Fraction), the height is computed relative to the view size minus the scan area margins.

sizeWithUnitAndAspect#
get sizeWithUnitAndAspect(): SizeWithUnitAndAspect

Added in version 6.1.0

The size and sizing mode of the location selection.