#include <imagedata.h>
Definition at line 55 of file imagedata.h.
◆ WordFeature() [1/2]
tesseract::WordFeature::WordFeature |
( |
| ) |
|
◆ WordFeature() [2/2]
tesseract::WordFeature::WordFeature |
( |
const FCOORD & |
fcoord, |
|
|
uinT8 |
dir |
|
) |
| |
Definition at line 48 of file imagedata.cpp.
int IntCastRounded(double x)
T ClipToRange(const T &x, const T &lower_bound, const T &upper_bound)
◆ ComputeSize()
Definition at line 55 of file imagedata.cpp.
59 for (
int f = 0; f < features.
size(); ++f) {
60 if (features[f].x_ > *max_x) *max_x = features[f].x_;
61 if (features[f].y_ > *max_y) *max_y = features[f].y_;
◆ DeSerialize()
bool tesseract::WordFeature::DeSerialize |
( |
bool |
swap, |
|
|
FILE * |
fp |
|
) |
| |
Definition at line 91 of file imagedata.cpp.
92 if (fread(&x_,
sizeof(x_), 1, fp) != 1)
return false;
94 if (fread(&y_,
sizeof(y_), 1, fp) != 1)
return false;
95 if (fread(&dir_,
sizeof(dir_), 1, fp) != 1)
return false;
void ReverseN(void *ptr, int num_bytes)
◆ dir()
int tesseract::WordFeature::dir |
( |
| ) |
const |
|
inline |
◆ Draw()
Definition at line 66 of file imagedata.cpp.
68 #ifndef GRAPHICS_DISABLED 69 for (
int f = 0; f < features.
size(); ++f) {
70 FCOORD pos(features[f].x_, features[f].y_);
72 dir.from_direction(features[f].dir_);
void DrawTo(int x, int y)
int IntCastRounded(double x)
void SetCursor(int x, int y)
◆ Serialize()
bool tesseract::WordFeature::Serialize |
( |
FILE * |
fp | ) |
const |
Definition at line 83 of file imagedata.cpp.
84 if (fwrite(&x_,
sizeof(x_), 1, fp) != 1)
return false;
85 if (fwrite(&y_,
sizeof(y_), 1, fp) != 1)
return false;
86 if (fwrite(&dir_,
sizeof(dir_), 1, fp) != 1)
return false;
◆ x()
int tesseract::WordFeature::x |
( |
| ) |
const |
|
inline |
◆ y()
int tesseract::WordFeature::y |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: