Tesseract
3.02
|
Go to the source code of this file.
Classes | |
struct | split_record |
Defines | |
#define | clone_split(dest, source) |
Typedefs | |
typedef struct split_record | SPLIT |
typedef LIST | SPLITS |
Functions | |
void | delete_split (SPLIT *split) |
EDGEPT * | make_edgept (int x, int y, EDGEPT *next, EDGEPT *prev) |
void | remove_edgept (EDGEPT *point) |
SPLIT * | new_split (EDGEPT *point1, EDGEPT *point2) |
void | print_split (SPLIT *split) |
void | split_outline (EDGEPT *join_point1, EDGEPT *join_point2) |
void | unsplit_outlines (EDGEPT *p1, EDGEPT *p2) |
Variables | |
bool | wordrec_display_splits = 0 |
#define clone_split | ( | dest, | |
source | |||
) |
typedef struct split_record SPLIT |
void delete_split | ( | SPLIT * | split | ) |
Definition at line 65 of file split.cpp.
{ EDGEPT *this_edgept; /* Create point */ this_edgept = new EDGEPT; this_edgept->pos.x = x; this_edgept->pos.y = y; /* Hook it up */ this_edgept->next = next; this_edgept->prev = prev; prev->next = this_edgept; next->prev = this_edgept; /* Set up vec entries */ this_edgept->vec.x = this_edgept->next->pos.x - x; this_edgept->vec.y = this_edgept->next->pos.y - y; this_edgept->prev->vec.x = x - this_edgept->prev->pos.x; this_edgept->prev->vec.y = y - this_edgept->prev->pos.y; return (this_edgept); }
void print_split | ( | SPLIT * | split | ) |
void remove_edgept | ( | EDGEPT * | point | ) |
Definition at line 136 of file split.cpp.
{ EDGEPT *join_point1a; EDGEPT *temp2; EDGEPT *temp1; assert (join_point1 != join_point2); temp2 = join_point2->next; temp1 = join_point1->next; /* Create two new points */ join_point1a = make_edgept (join_point1->pos.x, join_point1->pos.y, temp1, join_point2); make_edgept (join_point2->pos.x, join_point2->pos.y, temp2, join_point1); }
Definition at line 158 of file split.cpp.
{ EDGEPT *tmp1 = p1->next; EDGEPT *tmp2 = p2->next; assert (p1 != p2); tmp1->next->prev = p2; tmp2->next->prev = p1; p1->next = tmp2->next; p2->next = tmp1->next; delete tmp1; delete tmp2; p1->vec.x = p1->next->pos.x - p1->pos.x; p1->vec.y = p1->next->pos.y - p1->pos.y; p2->vec.x = p2->next->pos.x - p2->pos.x; p2->vec.y = p2->next->pos.y - p2->pos.y; }
bool wordrec_display_splits = 0 |