# Common Data Structures

## Geometric Types

Defined in namespace Scandit.DataCapture.Core.Geometry

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.

ShorterDimensionAndAspectRatio

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
`struct Point`

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

Construct a new point at position x and y.

X
``float` X { get; }`

X coordinate of the point.

Y
``float` Y { get; }`

Y coordinate of the point.

PointWithUnit
`struct PointWithUnit`

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

Construct a new point at position x and y.

X
`FloatWithUnit X { get; }`

X coordinate of the point.

Y
`FloatWithUnit Y { get; }`

Y coordinate of the point.

SizeWithUnit
`struct SizeWithUnit`

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

Construct a new size with unit.

Width
`FloatWithUnit Width { get; }`

The width.

Height
`FloatWithUnit Height { get; }`

The height.

SizeWithAspect
`struct 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 { get; }`

The size of one dimension.

Aspect
``float` Aspect { get; }`

The aspect ratio for the other dimension.

FloatWithUnit
`struct 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 { get; }`

Unit
`MeasureUnit Unit { get; }`

MarginsWithUnit
`struct 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 { get; }`

Left margin.

Right
`FloatWithUnit Right { get; }`

Right margin.

Top
`FloatWithUnit Top { get; }`

Top margin.

Bottom
`FloatWithUnit Bottom { get; }`

Bottom margin.

`struct Quadrilateral`

Polygon represented by 4 corners.

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

TopLeft
`Point TopLeft { get; }`

TopRight
`Point TopRight { get; }`

BottomRight
`Point BottomRight { get; }`

BottomLeft
`Point BottomLeft { get; }`

Size
`struct Size`

Size()
`Size(`float` width, `float` height)`

Width
``float` Width { get; }`

The width.

Height
``float` Height { get; }`

The height.

SizeWithUnitAndAspect
`class SizeWithUnitAndAspect`

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

WidthAndHeight
`SizeWithUnit WidthAndHeight { get; }`

The values for width and height.

Note

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

WidthAndAspectRatio
`SizeWithAspect WidthAndAspectRatio { get; }`

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 { get; }`

The value for height and the aspect ratio for width.

Note

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

ShorterDimensionAndAspectRatio
`SizeWithAspect ShorterDimensionAndAspectRatio { get; }`

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.ShorterDimensionAndAspectRatio.

SizingMode
`SizingMode SizingMode { get; }`

The sizing mode.

## Misc Types

Defined in namespace Scandit.DataCapture.Core.Common.Async

Defined in namespace Scandit.DataCapture.Core.Common.Buffer

EncodingRange
`class EncodingRange`

Defines the encoding of a range of bytes.

IanaName
``string` IanaName { get; }`

Charset encoding name as defined by IANA.

StartIndex
``uint` StartIndex { get; }`

Start index of this encoding range.

EndIndex
``uint` EndIndex { get; }`

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

Defined in namespace Scandit.DataCapture.Core.UI.Orientation

Orientation

Unknown

Portrait

PortraitUpsideDown