tesseract  5.0.0-alpha-619-ge9db
polyblk.cpp File Reference
#include "polyblk.h"
#include "elst.h"
#include <cctype>
#include <cinttypes>
#include <cmath>
#include <cstdio>
#include <memory>

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.

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