tesseract  4.0.0-1-g2a2b
werd.cpp File Reference
#include "helpers.h"
#include "linlsq.h"
#include "werd.h"

Go to the source code of this file.

Macros

#define FIRST_COLOUR   ScrollView::RED
 
#define LAST_COLOUR   ScrollView::AQUAMARINE
 
#define CHILD_COLOUR   ScrollView::BROWN
 

Functions

int word_comparator (const void *word1p, const void *word2p)
 

Variables

const ERRCODE CANT_SCALE_EDGESTEPS
 

Macro Definition Documentation

◆ CHILD_COLOUR

#define CHILD_COLOUR   ScrollView::BROWN

Definition at line 31 of file werd.cpp.

◆ FIRST_COLOUR

#define FIRST_COLOUR   ScrollView::RED

Definition at line 29 of file werd.cpp.

◆ LAST_COLOUR

#define LAST_COLOUR   ScrollView::AQUAMARINE

Definition at line 30 of file werd.cpp.

Function Documentation

◆ word_comparator()

int word_comparator ( const void *  word1p,
const void *  word2p 
)

word_comparator()

word comparator used to sort a word list so that words are in increasing order of left edge.

Definition at line 393 of file werd.cpp.

393  {
394  const WERD *word1 = *reinterpret_cast<const WERD* const*>(word1p);
395  const WERD *word2 = *reinterpret_cast<const WERD* const*>(word2p);
396  return word1->bounding_box().left() - word2->bounding_box().left();
397 }
TBOX bounding_box() const
Definition: werd.cpp:159
int16_t left() const
Definition: rect.h:72
Definition: werd.h:59

Variable Documentation

◆ CANT_SCALE_EDGESTEPS

const ERRCODE CANT_SCALE_EDGESTEPS
Initial value:
=
"Attempted to scale an edgestep format word"

Definition at line 33 of file werd.cpp.