Common Data Structures
Geometric Types
Defined under the namespace Scandit.Datacapture.Core
- MeasureUnit
Added in version 6.8.0
Specifies in what units the value has been specified (fraction, device-independent pixels, pixels).
- DIP
Added in version 6.8.0
Value is measured in device-independent pixels.
- Pixel
Added in version 6.8.0
Value is measured in pixels.
- Fraction
Added in version 6.8.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.8.0
An enumeration of possible ways to define a rectangular size.
- WidthAndHeight
Added in version 6.8.0
This value will use a SizeWithUnit to determine width and the height.
- WidthAndAspectRatio
Added in version 6.8.0
This value will use a NumberWithUnit to determine the width and a float multiplier to determine the height.
- HeightAndAspectRatio
Added in version 6.8.0
This value will use a NumberWithUnit to determine the height and a float multiplier to determine the width.
- ShorterDimensionAndAspectRatio
Added in version 6.8.0
This value will use a NumberWithUnit 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.8.0
- PointWithUnit
class PointWithUnit
Added in version 6.8.0
- x
get x(): NumberWithUnit
Added in version 6.8.0
X coordinate of the point.
- y
get y(): NumberWithUnit
Added in version 6.8.0
Y coordinate of the point.
- Rect
class Rect
Added in version 6.8.0
- RectWithUnit
class RectWithUnit
Added in version 6.8.0
- origin
get origin(): PointWithUnit
Added in version 6.8.0
The origin (top-left corner) of the rectangle.
- size
get size(): SizeWithUnit
Added in version 6.8.0
The size of the rectangle.
- SizeWithUnit
class SizeWithUnit
Added in version 6.8.0
- width
get width(): NumberWithUnit
Added in version 6.8.0
The width.
- height
get height(): NumberWithUnit
Added in version 6.8.0
The height.
- SizeWithAspect
class SizeWithAspect
Added in version 6.8.0
Holds values to define a rectangular size using a dimension and an aspect ratio multiplier.
- size
get size(): NumberWithUnit
Added in version 6.8.0
The size of one dimension.
- NumberWithUnit
class NumberWithUnit
Added in version 6.8.0
Holds a floating-point value plus a measure unit.
- unit
get unit(): MeasureUnit
Added in version 6.8.0
- MarginsWithUnit
class MarginsWithUnit
Added in version 6.8.0
Holds margin values (left, top, right, bottom) that can each be expressed with a different measure unit.
- left
get left(): NumberWithUnit
Added in version 6.8.0
Left margin.
- right
get right(): NumberWithUnit
Added in version 6.8.0
Right margin.
- top
get top(): NumberWithUnit
Added in version 6.8.0
Top margin.
- bottom
get bottom(): NumberWithUnit
Added in version 6.8.0
Bottom margin.
- Quadrilateral
class Quadrilateral
Added in version 6.8.0
Polygon represented by 4 corners.
- Size
class Size
Added in version 6.8.0
- SizeWithUnitAndAspect
class SizeWithUnitAndAspect
Added in version 6.8.0
Holds a SizingMode - and corresponding required values - to define a rectangular size.
- widthAndHeight
get widthAndHeight(): SizeWithUnit | null
Added in version 6.8.0
The values for width and height.
Note
This value will always be null unless sizingMode is SizingMode.WidthAndHeight.
- widthAndAspectRatio
get widthAndAspectRatio(): SizeWithAspect | null
Added in version 6.8.0
The value for width and the aspect ratio for height.
Note
This value will always be null unless sizingMode is SizingMode.WidthAndAspectRatio.
- heightAndAspectRatio
get heightAndAspectRatio(): SizeWithAspect | null
Added in version 6.8.0
The value for height and the aspect ratio for width.
Note
This value will always be null unless sizingMode is SizingMode.HeightAndAspectRatio.
- shorterDimensionAndAspectRatio
get shorterDimensionAndAspectRatio(): SizeWithAspect | null
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.ShorterDimensionAndAspectRatio.
- sizingMode
get sizingMode(): SizingMode
Added in version 6.8.0
The sizing mode.
Misc Types
Defined under the namespace Scandit.Datacapture.Core
Defined under the namespace Scandit.Datacapture.Core
- EncodingRange
class EncodingRange
Added in version 6.8.0
Defines the encoding of a range of bytes.
Defined under the namespace Scandit.Datacapture.Core
- Orientation
Added in version 6.8.0
- Unknown
Added in version 6.8.0
- Portrait
Added in version 6.8.0
- PortraitUpsideDown
Added in version 6.8.0
- LandscapeRight
Added in version 6.8.0
- LandscapeLeft
Added in version 6.8.0
- Color
class Color
Added in version 6.8.0
- fromHex(hex)
static fromHex(hex: string): Color
Added in version 6.8.0
Create a color from a hexadecimal string. Colors can be represented by hexadecimal strings in the following formats (R = red, G = green, B = blue, A = alpha) with an optional # prefix. The characters can be upper or lower case:
RRGGBB
RRGGBBAA
#RRGGBB
#RRGGBBAA
RGB
RGBA
#RGB
#RGBA
- fromRGBA(red, green, blue, alpha)
static fromRGBA(red: number, green: number, blue: number, alpha: number): Color
Added in version 6.8.0
Create a color from numerical color components.
- withAlpha(alpha)
withAlpha(alpha: number): Color
Added in version 6.8.0
Create a color that only differs in it’s alpha component.
- redComponent
get redComponent(): string
Added in version 6.8.0
Red component of the color as a hexadecimal string.
- greenComponent
get greenComponent(): string
Added in version 6.8.0
Green component of the color as a hexadecimal string.
- blueComponent
get blueComponent(): string
Added in version 6.8.0
Blue component of the color as a hexadecimal string.
Defined under the namespace Scandit.Datacapture.Core