L_MATRIX

struct L_MATRIX 
{ 
   L_DOUBLE m11; 
   L_DOUBLE m12; 
   L_DOUBLE m21; 
   L_DOUBLE m22; 
   L_DOUBLE offsetX; 
   L_DOUBLE offsetY; 
   L_INT type; 
   L_INT padding; 
}; 
typedef struct L_MATRIX L_MATRIX; 

Represents a 3x3 affine transformation matrix used for transformations in 2-D space.

Member

Description

m11 The value of the first row and first column.
m12 The value of the first row and second column.
m21 The value of the second row and first column.
m22 The value of the second row and second column.
offsetX The x translation value (the dx value, or the element in the third row and first column).
offsetY The y translation value (the dy value, or the element in the third row and second column).
type Internal use only.
padding Internal use only.

Comments

3x3 matrix is used for transformations in a 2-D x-y plane. Affine transformation matrices can be multiplied to form any number of linear transformations, such as rotation and skew (shear), followed by translation. An affine transformation matrix has its final column equal to (0, 0, 1), so only the members in the first two columns need to be specified. Note that vectors are expressed as row-vectors, not column vectors.

The L_MATRIX is stored using row-major order and has the following structure:

m11

m12

0

m21

m22

0

offsetX

offsetY

1

members in the last row, offsetX and offsetY, represent translation values.

In functions and structure memebers, the transformation matrix is usually specified as a vector with only six members, as follows:

(m11, m12, m21, m22, offsetX, offsetY)

The following functions make use of this structure:
L_PointD_Multiply
L_RectD_Transform
L_Matrix_Set
L_Matrix_Identity
L_Matrix_IsIdentity
L_Matrix_Determinant
L_Matrix_HasInverse
L_Matrix_GetM11
L_Matrix_SetM11
L_Matrix_GetM12
L_Matrix_SetM12
L_Matrix_GetM21
L_Matrix_SetM21
L_Matrix_GetM22
L_Matrix_SetM22
L_Matrix_GetOffsetX
L_Matrix_SetOffsetX
L_Matrix_GetOffsetY
L_Matrix_SetOffsetY
L_Matrix_Multiply
L_Matrix_Append
L_Matrix_Prepend
L_Matrix_Rotate
L_Matrix_RotatePrepend
L_Matrix_RotateAt
L_Matrix_RotateAtPrepend
L_Matrix_Scale
L_Matrix_ScalePrepend
L_Matrix_ScaleAt
L_Matrix_ScaleAtPrepend
L_Matrix_Skew
L_Matrix_SkewPrepend
L_Matrix_Translate
L_Matrix_TranslatePrepend
L_Matrix_TransformPoint
L_Matrix_TransformVector
L_Matrix_TransformPoints
L_Matrix_TransformRect
L_Matrix_Invert
L_Matrix_IsEqual

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help