Tesseract  3.02
tesseract-ocr/ccstruct/ipoints.h File Reference
#include <math.h>

Go to the source code of this file.

Functions

ICOORD operator! (const ICOORD &src)
ICOORD operator- (const ICOORD &src)
ICOORD operator+ (const ICOORD &op1, const ICOORD &op2)
ICOORDoperator+= (ICOORD &op1, const ICOORD &op2)
ICOORD operator- (const ICOORD &op1, const ICOORD &op2)
ICOORDoperator-= (ICOORD &op1, const ICOORD &op2)
inT32 operator% (const ICOORD &op1, const ICOORD &op2)
inT32 operator* (const ICOORD &op1, const ICOORD &op2)
ICOORD operator* (const ICOORD &op1, inT16 scale)
ICOORD operator* (inT16 scale, const ICOORD &op1)
ICOORDoperator*= (ICOORD &op1, inT16 scale)
ICOORD operator/ (const ICOORD &op1, inT16 scale)
ICOORDoperator/= (ICOORD &op1, inT16 scale)
FCOORD operator! (const FCOORD &src)
FCOORD operator- (const FCOORD &src)
FCOORD operator+ (const FCOORD &op1, const FCOORD &op2)
FCOORDoperator+= (FCOORD &op1, const FCOORD &op2)
FCOORD operator- (const FCOORD &op1, const FCOORD &op2)
FCOORDoperator-= (FCOORD &op1, const FCOORD &op2)
float operator% (const FCOORD &op1, const FCOORD &op2)
float operator* (const FCOORD &op1, const FCOORD &op2)
FCOORD operator* (const FCOORD &op1, float scale)
FCOORD operator* (float scale, const FCOORD &op1)
FCOORDoperator*= (FCOORD &op1, float scale)
FCOORD operator/ (const FCOORD &op1, float scale)
FCOORDoperator/= (FCOORD &op1, float scale)

Function Documentation

ICOORD operator! ( const ICOORD src) [inline]

Definition at line 32 of file ipoints.h.

  {
  ICOORD result;                 //output

  result.xcoord = -src.ycoord;
  result.ycoord = src.xcoord;
  return result;
}
FCOORD operator! ( const FCOORD src) [inline]

Definition at line 258 of file ipoints.h.

  {
  FCOORD result;                 //output

  result.xcoord = -src.ycoord;
  result.ycoord = src.xcoord;
  return result;
}
inT32 operator% ( const ICOORD op1,
const ICOORD op2 
) [inline]

Definition at line 136 of file ipoints.h.

                    {
  return op1.xcoord * op2.xcoord + op1.ycoord * op2.ycoord;
}
float operator% ( const FCOORD op1,
const FCOORD op2 
) [inline]

Definition at line 362 of file ipoints.h.

                    {
  return op1.xcoord * op2.xcoord + op1.ycoord * op2.ycoord;
}
inT32 operator* ( const ICOORD op1,
const ICOORD op2 
) [inline]

Definition at line 149 of file ipoints.h.

                                           {
  return op1.xcoord * op2.ycoord - op1.ycoord * op2.xcoord;
}
ICOORD operator* ( const ICOORD op1,
inT16  scale 
) [inline]

Definition at line 162 of file ipoints.h.

                                      {
  ICOORD result;                 //output

  result.xcoord = op1.xcoord * scale;
  result.ycoord = op1.ycoord * scale;
  return result;
}
ICOORD operator* ( inT16  scale,
const ICOORD op1 
) [inline]

Definition at line 173 of file ipoints.h.

                          {
  ICOORD result;                 //output

  result.xcoord = op1.xcoord * scale;
  result.ycoord = op1.ycoord * scale;
  return result;
}
float operator* ( const FCOORD op1,
const FCOORD op2 
) [inline]

Definition at line 375 of file ipoints.h.

                                           {
  return op1.xcoord * op2.ycoord - op1.ycoord * op2.xcoord;
}
FCOORD operator* ( const FCOORD op1,
float  scale 
) [inline]

Definition at line 388 of file ipoints.h.

                                      {
  FCOORD result;                 //output

  result.xcoord = op1.xcoord * scale;
  result.ycoord = op1.ycoord * scale;
  return result;
}
FCOORD operator* ( float  scale,
const FCOORD op1 
) [inline]

Definition at line 399 of file ipoints.h.

                          {
  FCOORD result;                 //output

  result.xcoord = op1.xcoord * scale;
  result.ycoord = op1.ycoord * scale;
  return result;
}
ICOORD& operator*= ( ICOORD op1,
inT16  scale 
) [inline]

Definition at line 192 of file ipoints.h.

             {
  op1.xcoord *= scale;
  op1.ycoord *= scale;
  return op1;
}
FCOORD& operator*= ( FCOORD op1,
float  scale 
) [inline]

Definition at line 418 of file ipoints.h.

             {
  op1.xcoord *= scale;
  op1.ycoord *= scale;
  return op1;
}
ICOORD operator+ ( const ICOORD op1,
const ICOORD op2 
) [inline]

Definition at line 68 of file ipoints.h.

                    {
  ICOORD sum;                    //result

  sum.xcoord = op1.xcoord + op2.xcoord;
  sum.ycoord = op1.ycoord + op2.ycoord;
  return sum;
}
FCOORD operator+ ( const FCOORD op1,
const FCOORD op2 
) [inline]

Definition at line 294 of file ipoints.h.

                    {
  FCOORD sum;                    //result

  sum.xcoord = op1.xcoord + op2.xcoord;
  sum.ycoord = op1.ycoord + op2.ycoord;
  return sum;
}
ICOORD& operator+= ( ICOORD op1,
const ICOORD op2 
) [inline]

Definition at line 86 of file ipoints.h.

                    {
  op1.xcoord += op2.xcoord;
  op1.ycoord += op2.ycoord;
  return op1;
}
FCOORD& operator+= ( FCOORD op1,
const FCOORD op2 
) [inline]

Definition at line 312 of file ipoints.h.

                    {
  op1.xcoord += op2.xcoord;
  op1.ycoord += op2.ycoord;
  return op1;
}
ICOORD operator- ( const ICOORD src) [inline]

Definition at line 50 of file ipoints.h.

  {
  ICOORD result;                 //output

  result.xcoord = -src.xcoord;
  result.ycoord = -src.ycoord;
  return result;
}
ICOORD operator- ( const ICOORD op1,
const ICOORD op2 
) [inline]

Definition at line 102 of file ipoints.h.

                    {
  ICOORD sum;                    //result

  sum.xcoord = op1.xcoord - op2.xcoord;
  sum.ycoord = op1.ycoord - op2.ycoord;
  return sum;
}
FCOORD operator- ( const FCOORD src) [inline]

Definition at line 276 of file ipoints.h.

  {
  FCOORD result;                 //output

  result.xcoord = -src.xcoord;
  result.ycoord = -src.ycoord;
  return result;
}
FCOORD operator- ( const FCOORD op1,
const FCOORD op2 
) [inline]

Definition at line 328 of file ipoints.h.

                    {
  FCOORD sum;                    //result

  sum.xcoord = op1.xcoord - op2.xcoord;
  sum.ycoord = op1.ycoord - op2.ycoord;
  return sum;
}
ICOORD& operator-= ( ICOORD op1,
const ICOORD op2 
) [inline]

Definition at line 120 of file ipoints.h.

                    {
  op1.xcoord -= op2.xcoord;
  op1.ycoord -= op2.ycoord;
  return op1;
}
FCOORD& operator-= ( FCOORD op1,
const FCOORD op2 
) [inline]

Definition at line 346 of file ipoints.h.

                    {
  op1.xcoord -= op2.xcoord;
  op1.ycoord -= op2.ycoord;
  return op1;
}
ICOORD operator/ ( const ICOORD op1,
inT16  scale 
) [inline]

Definition at line 208 of file ipoints.h.

             {
  ICOORD result;                 //output

  result.xcoord = op1.xcoord / scale;
  result.ycoord = op1.ycoord / scale;
  return result;
}
FCOORD operator/ ( const FCOORD op1,
float  scale 
) [inline]

Definition at line 434 of file ipoints.h.

             {
  FCOORD result;                 //output

  if (scale != 0) {
    result.xcoord = op1.xcoord / scale;
    result.ycoord = op1.ycoord / scale;
  }
  return result;
}
ICOORD& operator/= ( ICOORD op1,
inT16  scale 
) [inline]

Definition at line 226 of file ipoints.h.

             {
  op1.xcoord /= scale;
  op1.ycoord /= scale;
  return op1;
}
FCOORD& operator/= ( FCOORD op1,
float  scale 
) [inline]

Definition at line 454 of file ipoints.h.

             {
  if (scale != 0) {
    op1.xcoord /= scale;
    op1.ycoord /= scale;
  }
  return op1;
}