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

`PointWithUnit`#
``struct PointWithUnit``

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

Construct a new point at position x and y.

`X`#
`FloatWithUnit `X``

X coordinate of the point.

`Y`#
`FloatWithUnit `Y``

Y coordinate of the point.

`RectWithUnit`#
``struct RectWithUnit``

`Origin`#
`PointWithUnit `Origin``

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

`Size`#
`SizeWithUnit `Size``

The size of the rectangle.

`SizeWithUnit`#
``struct SizeWithUnit``

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

Construct a new size with unit.

`Width`#
`FloatWithUnit `Width``

The width.

`Height`#
`FloatWithUnit `Height``

The height.

`SizeWithAspect`#
``struct SizeWithAspect``

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

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

Construct a new size with aspect.

`Size`#
`FloatWithUnit `Size``

The size of one dimension.

`Aspect`#
``nfloat` `Aspect``

The aspect ratio for the other dimension.

`FloatWithUnit`#
``struct FloatWithUnit``

Holds a floating-point value plus a measure unit.

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

Construct a new float with unit.

`Value`#
``nfloat` `Value``

`Unit`#
`MeasureUnit `Unit``

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

Left margin.

`Right`#
`FloatWithUnit `Right``

Right margin.

`Top`#
`FloatWithUnit `Top``

Top margin.

`Bottom`#
`FloatWithUnit `Bottom``

Bottom margin.

`Quadrilateral`#
``struct Quadrilateral``

Polygon represented by 4 corners.

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

`TopLeft`#
`CGPoint `TopLeft``

`TopRight`#
`CGPoint `TopRight``

`BottomRight`#
`CGPoint `BottomRight``

`BottomLeft`#
`CGPoint `BottomLeft``

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

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

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

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