# Common Data Structures#

## Geometric Types#

Defined in namespace Scandit.Datacapture.Core

`MeasureUnit`#

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

`Dip`#

Value is measured in device-independent pixels.

`Pixel`#

Value is measured in pixels.

`Fraction`#

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`#

An enumeration of possible ways to define a rectangular size.

`WidthAndHeight`#

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

`WidthAndAspectRatio`#

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

`HeightAndAspectRatio`#

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

`Point`#
``class Point``

`Point()`#
``Point`(`float` x, `float` y)`

Construct a new point at position x and y.

`X`#
``float` `X` {readonly}`

X coordinate of the point.

`Y`#
``float` `Y` {readonly}`

Y coordinate of the point.

`PointWithUnit`#
``class PointWithUnit``

`PointWithUnit()`#
``PointWithUnit`(FloatWithUnit x, FloatWithUnit y)`

Construct a new point at position x and y.

`X`#
`FloatWithUnit `X` {readonly}`

X coordinate of the point.

`Y`#
`FloatWithUnit `Y` {readonly}`

Y coordinate of the point.

`Rect`#
``class Rect``

`Rect()`#
``Rect`(Point origin, Size2 size)`

Construct a new rectangle.

`Origin`#
`Point `Origin` {readonly}`

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

`Size`#
`Size2 `Size` {readonly}`

The size of the rectangle.

`RectWithUnit`#
``class RectWithUnit``

`RectWithUnit()`#
``RectWithUnit`(PointWithUnit point, SizeWithUnit size)`

Construct a new rectangle with unit.

`Origin`#
`PointWithUnit `Origin` {readonly}`

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

`Size`#
`SizeWithUnit `Size` {readonly}`

The size of the rectangle.

`Size2`#
``class Size2``

`Size2()`#
``Size2`(`float` width, `float` height)`

Construct a new Size2 instance.

`Width`#
``float` `Width` {readonly}`

The width.

`Height`#
``float` `Height` {readonly}`

The height.

`SizeWithUnit`#
``class SizeWithUnit``

`SizeWithUnit()`#
``SizeWithUnit`(FloatWithUnit width, FloatWithUnit height)`

Construct a new size with unit.

`Width`#
`FloatWithUnit `Width` {readonly}`

The width.

`Height`#
`FloatWithUnit `Height` {readonly}`

The height.

`SizeWithAspect`#
``class SizeWithAspect``

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

`SizeWithAspect()`#
``SizeWithAspect`(FloatWithUnit size, `float` aspect)`

Construct a new size with aspect.

`Size`#
`FloatWithUnit `Size` {readonly}`

The size of one dimension.

`Aspect`#
``float` `Aspect` {readonly}`

The aspect ratio for the other dimension.

`FloatWithUnit`#
``class FloatWithUnit``

Holds a floating-point value plus a measure unit.

`FloatWithUnit()`#
``FloatWithUnit`(`float` value, MeasureUnit unit)`

Construct a new float with unit.

`Value`#
``float` `Value` {readonly}`

`Unit`#
`MeasureUnit `Unit` {readonly}`

`MarginsWithUnit`#
``class MarginsWithUnit``

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

`MarginsWithUnit()`#
``MarginsWithUnit`(FloatWithUnit left, FloatWithUnit top, FloatWithUnit right, FloatWithUnit bottom)`

Constructs a new MarginsWithUnit instance.

`Left`#
`FloatWithUnit `Left` {readonly}`

Left margin.

`Right`#
`FloatWithUnit `Right` {readonly}`

Right margin.

`Top`#
`FloatWithUnit `Top` {readonly}`

Top margin.

`Bottom`#
`FloatWithUnit `Bottom` {readonly}`

Bottom margin.

`Quadrilateral`#
``class Quadrilateral``

Polygon represented by 4 corners.

`Quadrilateral()`#
``Quadrilateral`(Point topLeft, Point topRight, Point bottomRight, Point bottomLeft)`

`TopLeft`#
`Point `TopLeft` {readonly}`

`TopRight`#
`Point `TopRight` {readonly}`

`BottomRight`#
`Point `BottomRight` {readonly}`

`BottomLeft`#
`Point `BottomLeft` {readonly}`

`SizeWithUnitAndAspect`#
``class SizeWithUnitAndAspect``

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

`WidthAndHeight`#
`SizeWithUnit `WidthAndHeight` {readonly}`

The values for width and height.

Note

This value will always be null unless SizingMode is SizingMode.WidthAndHeight.

`WidthAndAspectRatio`#
`SizeWithAspect `WidthAndAspectRatio` {readonly}`

The value for width and the aspect ratio for height.

Note

This value will always be null unless SizingMode is SizingMode.WidthAndAspectRatio.

`HeightAndAspectRatio`#
`SizeWithAspect `HeightAndAspectRatio` {readonly}`

The value for height and the aspect ratio for width.

Note

This value will always be null unless SizingMode is SizingMode.HeightAndAspectRatio.

`SizingMode`#
`SizingMode `SizingMode` {readonly}`

The sizing mode.

`ToJson()`#
``string` `ToJson`()`

## Misc Types#

Defined in namespace Scandit.Datacapture.Core

`ICallback`#
``interface ICallback``

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

`Run()`#
``void` `Run`(Object value)`

Called when the callback is invoked.

Defined in namespace Scandit.Datacapture.Core

`EncodingRange`#
``class EncodingRange``

Defines the encoding of a range of bytes.

`EncodingRange()`#
``EncodingRange`(`string` ianaName, `int` startIndex, `int` endIndex)`

Construct a new encoding range.

`IanaName`#
``string` `IanaName` {readonly}`

Charset encoding name as defined by IANA.

`StartIndex`#
``int` `StartIndex` {readonly}`

`EndIndex`#
``int` `EndIndex` {readonly}`