tesseract  4.0.0-1-g2a2b
polyblk.cpp File Reference
#include "polyblk.h"
#include <cctype>
#include <cmath>
#include <cstdio>
#include <memory>
#include "elst.h"

Go to the source code of this file.

Macros

#define INTERSECTING   INT16_MAX
 

Functions

POLY_BLOCK::reflect_in_y_axis

Reflect the coords of the polygon in the y-axis. (Flip the sign of x.)

int lessthan (const void *first, const void *second)
 

Macro Definition Documentation

◆ INTERSECTING

#define INTERSECTING   INT16_MAX

Definition at line 30 of file polyblk.cpp.

Function Documentation

◆ lessthan()

int lessthan ( const void *  first,
const void *  second 
)

Definition at line 378 of file polyblk.cpp.

378  {
379  const ICOORDELT *p1 = *reinterpret_cast<const ICOORDELT* const*>(first);
380  const ICOORDELT *p2 = *reinterpret_cast<const ICOORDELT* const*>(second);
381 
382  if (p1->x () < p2->x ())
383  return (-1);
384  else if (p1->x () > p2->x ())
385  return (1);
386  else
387  return (0);
388 }
int16_t x() const
access function
Definition: points.h:53