Index

D-Type Basic Data Types

All D-Type libraries utilize the following basic data types:

Numbers and Value Identifiers

Type Description
DT_UBYTE and DT_ID_UBYTE

8-bit unsigned integer

DT_SBYTE and DT_ID_SBYTE

8-bit signed integer

DT_UWORD and DT_ID_UWORD

16-bit unsigned integer

DT_SWORD and DT_ID_SWORD

16-bit signed integer

DT_ULONG and DT_ID_ULONG

32-bit unsigned integer

DT_SLONG and DT_ID_SLONG

32-bit signed integer

DT_UHUGE

64-bit unsigned integer, if supported by target platform and enabled by D-Type Engine; otherwise the same as DT_ULONG

DT_SHUGE

64-bit signed integer, if supported by target platform and enabled by D-Type Engine; otherwise the same as DT_SLONG

DT_SRAST_L or DT_SRAST

32-bit signed integer representing a whole pixel value. Technically DT_SRAST_L and DT_SRAST are simply aliases for the DT_SLONG type.

DT_SFRAC_L or DT_SFRAC

32-bit signed integer representing a 24.8 signed fractional pixel value. Technically DT_SFRAC_L and DT_SFRAC are simply aliases for the DT_SLONG type.

DT_FLOAT

floating point number — typically double (64-bit) precision

C/C++ Characters

Type Description
DT_CHAR

8-bit ANSI C/C++ character

Matrices

Type Description
DT_TM2X2 DT_FLOAT m[2][2] a 2x2 transformation matrix.

This matrix describes a two dimensional transformation. The transformation can be expressed in the following form:

tx = m[0][0] * x + m[0][1] * y
ty = m[1][0] * x + m[1][1] * y

In these equations x and y represent the original (source) coordinates, m[i][j] represent floating-point transformation parameters, and tx and ty represent the final (output) coordinates. This type of transformation represent a special case of a two-dimensional affine transformation.


Type Description
DT_TM3X3 DT_FLOAT m[3][3] a 3x3 transformation matrix.

This matrix describes a 2D perspective (or projective) transformation. The transformation can be expressed in the following form:

tx = (m[0][0] * x + m[0][1] * y + m[0][2]) / w
ty = (m[1][0] * x + m[1][1] * y + m[1][2]) / w

where w = (m[2][0] * x + m[2][1] * y + m[2][2])

In these equations x and y represent the original (source) coordinates, m[i][j] represent floating-point transformation parameters, and tx and ty represent the final (output) coordinates.

A 2D perspective transformation is capable of mapping an arbitrary quadrilateral into another arbitrary quadrilateral, while preserving the straightness of lines. However, unlike an affine transformation, the parallelism of lines in the source quadrilateral is not necessarily preserved in the output quadrilateral.

Finally, it should be noted that any two-dimensional affine transformation is merely a special case of the 2D perspective transformation (i.e. the case when w = 1.0 which is true when m[2][0] = 0.0, m[2][1] = 0.0 and m[2][2] = 1.0).

Device Context (Windows Only)

Type Description
DT_HDC

Windows Compatible Device Context (HDC)

Note: Support for Windows Device Context is limited and only available on Windows. Cross platform applications should not make use of this type. Starting with D-Type version 5, this data type is deprecated and included only for backward compatibility reasons.

 

Index