Common Data Structures

Geometric Types

Defined in package com.scandit.datacapture.core

MeasureUnit

Added in version 8.6.0

Specifies in what units the value has been specified (fraction, device-independent pixels, pixels).

DIP

Added in version 8.6.0

Value is measured in device-independent pixels.

PIXEL

Added in version 8.6.0

Value is measured in pixels.

FRACTION

Added in version 8.6.0

Value is measured as a fraction. Valid values range from 0 to 1. This can be used to specify values in relative coordinates with respect to a reference, e.g. the view width or height.

SizingMode

Added in version 8.6.0

An enumeration of possible ways to define a rectangular size.

WIDTH_AND_HEIGHT

Added in version 8.6.0

This value will use a SizeWithUnit to determine width and the height.

WIDTH_AND_ASPECT_RATIO

Added in version 8.6.0

This value will use a FloatWithUnit to determine the width and a float multiplier to determine the height.

HEIGHT_AND_ASPECT_RATIO

Added in version 8.6.0

This value will use a FloatWithUnit to determine the height and a float multiplier to determine the width.

SHORTER_DIMENSION_AND_ASPECT_RATIO

Added in version 8.6.0

This value will use a FloatWithUnit to determine the rectangle length on the short side of the reference and a float multiplier to determine the length on the long side.

Point
class Point

Added in version 8.6.0

Point()
Point(x: Float,
        y: Float)

Added in version 8.6.0

Constructs a new point at position x and y.

x
val x: Float

Added in version 8.6.0

X coordinate of the point.

y
val y: Float

Added in version 8.6.0

Y coordinate of the point.

PointWithUnit
class PointWithUnit

Added in version 8.6.0

PointWithUnit()
PointWithUnit(x: FloatWithUnit,
        y: FloatWithUnit)

Added in version 8.6.0

Constructs a new point at position x and y.

x
val x: FloatWithUnit

Added in version 8.6.0

X coordinate of the point.

y
val y: FloatWithUnit

Added in version 8.6.0

Y coordinate of the point.

zero()
fun PointWithUnit.zero(): PointWithUnit

Added in version 8.6.0

Returns a PointWithUnit with value set to 0.0f.

Rect
class Rect

Added in version 8.6.0

Rect(origin, size)
Rect(origin: Point,
        size: Size)

Added in version 8.6.0

Constructs a new rectangle.

origin
val origin: Point

Added in version 8.6.0

The origin (top-left corner) of the rectangle.

size
val size: Size

Added in version 8.6.0

The size of the rectangle.

RectWithUnit
class RectWithUnit

Added in version 8.6.0

RectWithUnit()
RectWithUnit(origin: PointWithUnit,
        size: SizeWithUnit)

Added in version 8.6.0

Constructs a new rectangle with unit.

origin
val origin: PointWithUnit

Added in version 8.6.0

The origin (top-left corner) of the rectangle.

size
val size: SizeWithUnit

Added in version 8.6.0

The size of the rectangle.

SizeWithUnit
class SizeWithUnit

Added in version 8.6.0

SizeWithUnit()
SizeWithUnit(width: FloatWithUnit,
        height: FloatWithUnit)

Added in version 8.6.0

Constructs a new size with unit.

width
val width: FloatWithUnit

Added in version 8.6.0

The width.

height
val height: FloatWithUnit

Added in version 8.6.0

The height.

zero()
fun SizeWithUnit.zero(): SizeWithUnit

Added in version 8.6.0

Returns a SizeWithUnit with value set to 0.0f.

SizeWithAspect
class SizeWithAspect

Added in version 8.6.0

Holds values to define a rectangular size using a dimension and an aspect ratio multiplier.

SizeWithAspect()
SizeWithAspect(size: FloatWithUnit,
        aspect: Float)

Added in version 8.6.0

Constructs a new size with aspect.

size
val size: FloatWithUnit

Added in version 8.6.0

The size of one dimension.

aspect
val aspect: Float

Added in version 8.6.0

The aspect ratio for the other dimension.

zero()
fun SizeWithAspect.zero(): SizeWithAspect

Added in version 8.6.0

Returns a SizeWithAspect with value set to 0.0f.

FloatWithUnit
class FloatWithUnit

Added in version 8.6.0

Holds a floating-point value plus a measure unit.

FloatWithUnit()
FloatWithUnit(value: Float,
        unit: MeasureUnit)

Added in version 8.6.0

Constructs a new float with unit.

value
val value: Float

Added in version 8.6.0

unit
val unit: MeasureUnit

Added in version 8.6.0

MarginsWithUnit
class MarginsWithUnit

Added in version 8.6.0

Holds margin values (left, top, right, bottom) that can each be expressed with a different measure unit.

MarginsWithUnit()
MarginsWithUnit(left: FloatWithUnit,
        top: FloatWithUnit,
        right: FloatWithUnit,
        bottom: FloatWithUnit)

Added in version 8.6.0

Constructs a new MarginsWithUnit instance.

left
val left: FloatWithUnit

Added in version 8.6.0

Left margin.

right
val right: FloatWithUnit

Added in version 8.6.0

Right margin.

top
val top: FloatWithUnit

Added in version 8.6.0

Top margin.

bottom
val bottom: FloatWithUnit

Added in version 8.6.0

Bottom margin.

Quadrilateral
class Quadrilateral

Added in version 8.6.0

Polygon represented by 4 corners.

Quadrilateral()
Quadrilateral(topLeft: Point,
        topRight: Point,
        bottomRight: Point,
        bottomLeft: Point)

Added in version 8.6.0

Constructs a new Quadrilateral instance.

topLeft
val topLeft: Point

Added in version 8.6.0

topRight
val topRight: Point

Added in version 8.6.0

bottomRight
val bottomRight: Point

Added in version 8.6.0

bottomLeft
val bottomLeft: Point

Added in version 8.6.0

Size
class Size

Added in version 8.6.0

Size()
Size(width: Float,
        height: Float)

Added in version 8.6.0

width
val width: Float

Added in version 8.6.0

The width.

height
val height: Float

Added in version 8.6.0

The height.

SizeWithUnitAndAspect
class SizeWithUnitAndAspect

Added in version 8.6.0

Holds a SizingMode - and corresponding required values - to define a rectangular size.

createFromWidthAndHeight(widthAndHeight)
fun SizeWithUnitAndAspect.createFromWidthAndHeight(widthAndHeight: SizeWithUnit): SizeWithUnitAndAspect

Added in version 8.6.0

Creates a rectangular size based on the given size.

createFromWidthAndAspectRatio(width, aspectRatio)
fun SizeWithUnitAndAspect.createFromWidthAndAspectRatio(width: FloatWithUnit,
        aspectRatio: Float): SizeWithUnitAndAspect

Added in version 8.6.0

Creates a rectangular size based on the given width and aspect ratio.

createFromHeightAndAspectRatio(height, aspectRatio)
fun SizeWithUnitAndAspect.createFromHeightAndAspectRatio(height: FloatWithUnit,
        aspectRatio: Float): SizeWithUnitAndAspect

Added in version 8.6.0

Creates a rectangular size based on the given height and aspect ratio.

createFromShorterDimensionAndAspectRatio(shorterDimension, aspectRatio)
fun SizeWithUnitAndAspect.createFromShorterDimensionAndAspectRatio(shorterDimension: FloatWithUnit,
        aspectRatio: Float): SizeWithUnitAndAspect

Added in version 8.6.0

Creates a rectangular size based on the given shorter dimension and aspect ratio.

widthAndHeight
val widthAndHeight: SizeWithUnit?

Added in version 8.6.0

The values for width and height.

Note

This value will always be null unless sizingMode is SizingMode.WIDTH_AND_HEIGHT.

widthAndAspectRatio
val widthAndAspectRatio: SizeWithAspect?

Added in version 8.6.0

The value for width and the aspect ratio for height.

Note

This value will always be null unless sizingMode is SizingMode.WIDTH_AND_ASPECT_RATIO.

heightAndAspectRatio
val heightAndAspectRatio: SizeWithAspect?

Added in version 8.6.0

The value for height and the aspect ratio for width.

Note

This value will always be null unless sizingMode is SizingMode.HEIGHT_AND_ASPECT_RATIO.

shorterDimensionAndAspectRatio
val shorterDimensionAndAspectRatio: SizeWithAspect?

Added in version 8.6.0

The value for the short dimension of the reference view and the aspect ratio for the long dimension of the reference view.

Note

This value will always be null unless sizingMode is SizingMode.SHORTER_DIMENSION_AND_ASPECT_RATIO.

sizingMode
val sizingMode: SizingMode

Added in version 8.6.0

The sizing mode.

Misc Types

Defined in package com.scandit.datacapture.core

Defined in package com.scandit.datacapture.core

EncodingRange
class EncodingRange

Added in version 8.6.0

Defines the encoding of a range of bytes.

EncodingRange(ianaName, startIndex, endIndex)
EncodingRange(ianaName: String,
        startIndex: Long,
        endIndex: Long)

Added in version 8.6.0

Constructs a new encoding range.

ianaName
val ianaName: String

Added in version 8.6.0

Charset encoding name as defined by IANA.

startIndex
val startIndex: Long

Added in version 8.6.0

Start index of this encoding range.

endIndex
val endIndex: Long

Added in version 8.6.0

End index (first index after the last) of this encoding range.

Defined in package com.scandit.datacapture.core

Orientation

Added in version 8.6.0

UNKNOWN

Added in version 8.6.0

PORTRAIT

Added in version 8.6.0

PORTRAIT_UPSIDE_DOWN

Added in version 8.6.0

LANDSCAPE_RIGHT

Added in version 8.6.0

LANDSCAPE_LEFT

Added in version 8.6.0

Defined in package com.scandit.datacapture.core

Color
class Color

Added in version 8.6.0

fromRgba(red, green, blue, alpha)
fun Color.fromRgba(red: Int,
        green: Int,
        blue: Int,
        alpha: Int): Color

Added in version 8.6.0

Creates a color from numerical color components.

red
val red: Int

Added in version 8.6.0

Red component of the color as a decimal value.

green
val green: Int

Added in version 8.6.0

Green component of the color as a decimal value.

blue
val blue: Int

Added in version 8.6.0

Blue component of the color as a decimal value.

alpha
val alpha: Int

Added in version 8.6.0

Alpha component of the color as a decimal value.

Defined in package com.scandit.datacapture.core

Defined in package com.scandit.datacapture.core

Defined in package com.scandit.datacapture.core