Tesseract
3.02
|
#include "fpoint.h"
Go to the source code of this file.
Classes | |
struct | MATRIX_2D |
Typedefs | |
typedef struct MATRIX_2D * | MATRIX_2D_PTR |
Functions | |
void | InitMatrix (MATRIX_2D *M) |
void | CopyMatrix (MATRIX_2D *A, MATRIX_2D *B) |
void | TranslateMatrix (MATRIX_2D *M, FLOAT32 X, FLOAT32 Y) |
void | ScaleMatrix (MATRIX_2D *M, FLOAT32 X, FLOAT32 Y) |
void | MirrorMatrixInX (MATRIX_2D *M) |
void | MirrorMatrixInY (MATRIX_2D *M) |
void | MirrorMatrixInXY (MATRIX_2D *M) |
FLOAT32 | MapX (MATRIX_2D *M, FLOAT32 X, FLOAT32 Y) |
FLOAT32 | MapY (MATRIX_2D *M, FLOAT32 X, FLOAT32 Y) |
void | MapPoint (MATRIX_2D *M, const FPOINT &A, FPOINT *B) |
FLOAT32 | MapDx (MATRIX_2D *M, FLOAT32 DX, FLOAT32 DY) |
FLOAT32 | MapDy (MATRIX_2D M, FLOAT32 DX, FLOAT32 DY) |
void | RotateMatrix (MATRIX_2D_PTR Matrix, FLOAT32 Angle) |
typedef struct MATRIX_2D * MATRIX_2D_PTR |
void InitMatrix | ( | MATRIX_2D * | M | ) |
---------------------------------------------------------------------------- Public Function Prototypes ----------------------------------------------------------------------------
---------------------------------------------------------------------------- Include Files and Type Defines ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Public Code ----------------------------------------------------------------------------
Definition at line 28 of file xform2d.cpp.
Definition at line 75 of file xform2d.cpp.
Definition at line 62 of file xform2d.cpp.
{ return M->a * (X) + (M)->c * (Y) + (M)->tx; }
Definition at line 66 of file xform2d.cpp.
void MirrorMatrixInX | ( | MATRIX_2D * | M | ) |
Definition at line 58 of file xform2d.cpp.
{ScaleMatrix(M, -1, 1);}
void MirrorMatrixInXY | ( | MATRIX_2D * | M | ) |
Definition at line 60 of file xform2d.cpp.
{ScaleMatrix(M, -1, -1);}
void MirrorMatrixInY | ( | MATRIX_2D * | M | ) |
Definition at line 59 of file xform2d.cpp.
{ScaleMatrix(M, 1, -1);}
void RotateMatrix | ( | MATRIX_2D_PTR | Matrix, |
FLOAT32 | Angle | ||
) |
Definition at line 85 of file xform2d.cpp.
{ /* ** Parameters: ** Matrix transformation matrix to rotate ** Angle angle to rotate matrix ** Globals: none ** Operation: ** Rotate the coordinate system (as specified by Matrix) about ** its origin by Angle radians. In matrix notation the ** effect is as follows: ** ** Matrix = R X Matrix ** ** where R is the following matrix ** ** cos Angle sin Angle 0 ** -sin Angle cos Angle 0 ** 0 0 1 ** Return: none ** Exceptions: none ** History: 7/27/89, DSJ, Create. */ FLOAT32 Cos, Sin; FLOAT32 NewA, NewB; Cos = cos ((double) Angle); Sin = sin ((double) Angle); NewA = Matrix->a * Cos + Matrix->c * Sin; NewB = Matrix->b * Cos + Matrix->d * Sin; Matrix->c = Matrix->a * -Sin + Matrix->c * Cos; Matrix->d = Matrix->b * -Sin + Matrix->d * Cos; Matrix->a = NewA; Matrix->b = NewB; } /* RotateMatrix */