#include <shapetable.h>
Definition at line 92 of file shapetable.h.
◆ ShapeRating() [1/2]
tesseract::ShapeRating::ShapeRating |
( |
| ) |
|
|
inline |
◆ ShapeRating() [2/2]
tesseract::ShapeRating::ShapeRating |
( |
int |
s, |
|
|
float |
r |
|
) |
| |
|
inline |
◆ FirstResultWithUnichar()
Definition at line 40 of file shapetable.cpp.
43 {
44 for (
int r = 0; r < results.
size(); ++r) {
45 const int shape_id = results[r].shape_id;
46 const Shape& shape = shape_table.GetShape(
shape_id);
47 if (shape.ContainsUnichar(unichar_id)) {
48 return r;
49 }
50 }
51 return -1;
52}
◆ SortDescendingRating()
static int tesseract::ShapeRating::SortDescendingRating |
( |
const void * |
t1, |
|
|
const void * |
t2 |
|
) |
| |
|
inlinestatic |
Definition at line 101 of file shapetable.h.
101 {
102 const auto* a =
static_cast<const ShapeRating*
>(t1);
103 const auto* b =
static_cast<const ShapeRating*
>(t2);
104 if (a->rating > b->rating) {
105 return -1;
106 } else if (a->rating < b->rating) {
107 return 1;
108 } else {
109 return a->shape_id - b->shape_id;
110 }
111 }
◆ broken
bool tesseract::ShapeRating::broken |
◆ font
float tesseract::ShapeRating::font |
◆ joined
bool tesseract::ShapeRating::joined |
◆ rating
float tesseract::ShapeRating::rating |
◆ raw
float tesseract::ShapeRating::raw |
◆ shape_id
int tesseract::ShapeRating::shape_id |
The documentation for this struct was generated from the following files: