Common Data Structures

Geometric Types

Defined in package com.scandit.datacapture.core.geometry

MeasureUnit

Added in version 6.0.0

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

DIP

Added in version 6.0.0

Value is measured in device-independent pixels.

PIXEL

Added in version 6.0.0

Value is measured in pixels.

FRACTION

Added in version 6.0.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 6.0.0

An enumeration of possible ways to define a rectangular size.

WIDTH_AND_HEIGHT

Added in version 6.0.0

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

WIDTH_AND_ASPECT_RATIO

Added in version 6.0.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 6.0.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 6.8.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 6.0.0

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

Added in version 6.0.0

Construct a new point at position x and y.

x
val x: Float

Added in version 6.0.0

X coordinate of the point.

y
val y: Float

Added in version 6.0.0

Y coordinate of the point.

PointWithUnit
class PointWithUnit

Added in version 6.0.0

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

Added in version 6.0.0

Construct a new point at position x and y.

x
val x: FloatWithUnit

Added in version 6.0.0

X coordinate of the point.

y
val y: FloatWithUnit

Added in version 6.0.0

Y coordinate of the point.

Rect
class Rect

Added in version 6.0.0

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

Added in version 6.0.0

Construct a new rectangle.

origin
val origin: Point

Added in version 6.0.0

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

size
val size: Size2

Added in version 6.0.0

The size of the rectangle.

RectWithUnit
class RectWithUnit

Added in version 6.0.0

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

Added in version 6.0.0

Construct a new rectangle with unit.

origin
val origin: PointWithUnit

Added in version 6.0.0

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

size
val size: SizeWithUnit

Added in version 6.0.0

The size of the rectangle.

Size2
class Size2

Added in version 6.0.0

Size2()
Size2(width: Float,
        height: Float)

Added in version 6.0.0

Construct a new Size2 instance.

width
val width: Float

Added in version 6.0.0

The width.

height
val height: Float

Added in version 6.0.0

The height.

SizeWithUnit
class SizeWithUnit

Added in version 6.0.0

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

Added in version 6.0.0

Construct a new size with unit.

width
val width: FloatWithUnit

Added in version 6.0.0

The width.

height
val height: FloatWithUnit

Added in version 6.0.0

The height.

SizeWithAspect
class SizeWithAspect

Added in version 6.0.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 6.0.0

Construct a new size with aspect.

size
val size: FloatWithUnit

Added in version 6.0.0

The size of one dimension.

aspect
val aspect: Float

Added in version 6.0.0

The aspect ratio for the other dimension.

FloatWithUnit
class FloatWithUnit

Added in version 6.0.0

Holds a floating-point value plus a measure unit.

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

Added in version 6.0.0

Construct a new float with unit.

value
val value: Float

Added in version 6.0.0

unit
val unit: MeasureUnit

Added in version 6.0.0

MarginsWithUnit
class MarginsWithUnit

Added in version 6.0.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 6.0.0

Constructs a new MarginsWithUnit instance.

left
val left: FloatWithUnit

Added in version 6.0.0

Left margin.

right
val right: FloatWithUnit

Added in version 6.0.0

Right margin.

top
val top: FloatWithUnit

Added in version 6.0.0

Top margin.

bottom
val bottom: FloatWithUnit

Added in version 6.0.0

Bottom margin.

MarginsF
class MarginsF

Added in version 6.23.0

Holds float margin values (left, top, right, bottom).

MarginsF()
MarginsF(left: Float,
        top: Float,
        right: Float,
        bottom: Float)

Added in version 6.23.0

Constructs a new MarginsF instance.

left
val left: Float

Added in version 6.23.0

Left margin.

right
val right: Float

Added in version 6.23.0

Right margin.

top
val top: Float

Added in version 6.23.0

Top margin.

bottom
val bottom: Float

Added in version 6.23.0

Bottom margin.

Quadrilateral
class Quadrilateral

Added in version 6.0.0

Polygon represented by 4 corners.

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

Added in version 6.0.0

Constructs a new Quadrilateral instance.

topLeft
val topLeft: Point

Added in version 6.0.0

topRight
val topRight: Point

Added in version 6.0.0

bottomRight
val bottomRight: Point

Added in version 6.0.0

bottomLeft
val bottomLeft: Point

Added in version 6.0.0

SizeWithUnitAndAspect
class SizeWithUnitAndAspect

Added in version 6.0.0

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

widthAndHeight
val widthAndHeight: SizeWithUnit?

Added in version 6.0.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 6.0.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 6.0.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 6.8.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 6.0.0

The sizing mode.

toJson()
fun toJson(): String

Added in version 6.1.0

Misc Types

Defined in package com.scandit.datacapture.core.common.async

Callback
interface Callback<T>

Added in version 6.0.0

Interface for a callback/callable accepting a generic parameter of type T.

run(result)
fun run(result: T)

Added in version 6.0.0

Called when the callback is invoked.

Defined in package com.scandit.datacapture.core.common.buffer

EncodingRange
class EncodingRange

Added in version 6.0.0

Defines the encoding of a range of bytes.

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

Added in version 6.0.0

Construct a new encoding range.

ianaName
val ianaName: String

Added in version 6.0.0

Charset encoding name as defined by IANA.

startIndex
val startIndex: Int

Added in version 6.0.0

Start index of this encoding range.

endIndex
val endIndex: Int

Added in version 6.0.0

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

Defined in package com.scandit.datacapture.core

Defined in package com.scandit.datacapture.core

Defined in package com.scandit.datacapture.core

Defined in package com.scandit.datacapture.core

Defined in package com.scandit.datacapture.core.time

TimeInterval
class TimeInterval

Added in version 6.0.0

Represents a duration/time interval.

millis(duration)
fun TimeInterval.millis(duration: Long): TimeInterval

Added in version 6.0.0

Returns a new time interval from the provided duration in milliseconds.

seconds(duration)
fun TimeInterval.seconds(duration: Float): TimeInterval

Added in version 6.0.0

Returns a new time interval from the provided duration in seconds.

asSeconds()
fun asSeconds(): Float

Added in version 6.0.0

Returns the duration in seconds.

asMillis()
fun asMillis(): Long

Added in version 6.0.0

Returns the duration in milliseconds