#include "mfcpch.h"
#include "stderr.h"
#include "blobbox.h"
#include "lmedsq.h"
#include "statistc.h"
#include "drawtord.h"
#include "tovars.h"
#include "varable.h"
#include "notdll.h"
#include "topitch.h"
Defines | |
#define | EXTERN |
Functions | |
ELISTIZE (OUTLINE_FRAG) ELISTIZE(C_OUTLINE_FRAG) ROW *fixed_pitch_words(TO_ROW *row | |
if (textord_show_page_cuts &&to_win!=NULL) | |
if (rep_it.empty()) rep_left | |
if (box_it.empty()) return NULL | |
if (rep_left< xstarts[0]) | |
if (cell_it.empty()||row->char_cells.singleton()) | |
ASSERT_HOST (!cell_it.empty()&&!row->char_cells.singleton()) | |
while (rep_left< cell_it.data()->x()) | |
cell_it | mark_cycle_pt () |
if (prev_chop_coord >=cell_it.data()->x()) cell_it.forward() | |
for (;!cell_it.cycled_list();cell_it.forward()) | |
if (!blob_it.empty()||!cblob_it.empty()) | |
ASSERT_HOST (word!=NULL) | |
while (!rep_it.empty()) | |
word_it | data ()->set_flag(W_EOL |
if (prev_chop_coord > prev_x) prev_x | |
word_it | set_to_list (real_row->word_list()) |
real_row | recalc_bounding_box () |
WERD * | add_repeated_word (WERD_IT *rep_it, inT16 &rep_left, inT16 &prev_chop_coord, uinT8 &blanks, float pitch, WERD_IT *word_it) |
void | split_to_blob (BLOBNBOX *blob, inT16 chop_coord, float pitch_error, OUTLINE_LIST *left_outlines, C_OUTLINE_LIST *left_coutlines, OUTLINE_LIST *right_outlines, C_OUTLINE_LIST *right_coutlines) |
void | fixed_chop_blob (PBLOB *blob, inT16 chop_coord, float pitch_error, OUTLINE_LIST *left_outlines, OUTLINE_LIST *right_outlines) |
void | fixed_split_outline (OUTLINE *srcline, inT16 chop_coord, float pitch_error, OUTLINE_IT *left_it, OUTLINE_IT *right_it) |
BOOL8 | fixed_chop_outline (OUTLINE *srcline, inT16 chop_coord, float pitch_error, OUTLINE_FRAG_LIST *left_frags, OUTLINE_FRAG_LIST *right_frags) |
void | save_chop_fragment (POLYPT_IT *head_it, POLYPT_IT *tail_it, OUTLINE_FRAG_LIST *frags) |
void | add_frag_to_list (OUTLINE_FRAG *frag, OUTLINE_FRAG_LIST *frags) |
void | insert_chop_pt (POLYPT_IT *it, inT16 chop_coord) |
FCOORD | find_chop_coords (POLYPT_IT *it, inT16 chop_coord) |
void | insert_extra_pt (POLYPT_IT *it) |
void | close_chopped_fragments (OUTLINE_FRAG_LIST *frags, OUTLINE_LIST *children, OUTLINE_IT *dest_it) |
void | join_chopped_fragments (OUTLINE_FRAG *bottom, OUTLINE_FRAG *top) |
void | fixed_chop_cblob (C_BLOB *blob, inT16 chop_coord, float pitch_error, C_OUTLINE_LIST *left_outlines, C_OUTLINE_LIST *right_outlines) |
void | fixed_split_coutline (C_OUTLINE *srcline, inT16 chop_coord, float pitch_error, C_OUTLINE_IT *left_it, C_OUTLINE_IT *right_it) |
BOOL8 | fixed_chop_coutline (C_OUTLINE *srcline, inT16 chop_coord, float pitch_error, C_OUTLINE_FRAG_LIST *left_frags, C_OUTLINE_FRAG_LIST *right_frags) |
inT16 | next_anti_left_seg (C_OUTLINE *srcline, inT16 tail_index, inT16 startindex, inT32 length, inT16 chop_coord, float pitch_error, ICOORD *tail_pos) |
inT16 | next_anti_right_seg (C_OUTLINE *srcline, inT16 tail_index, inT16 startindex, inT32 length, inT16 chop_coord, float pitch_error, ICOORD *tail_pos) |
inT16 | next_clock_left_seg (C_OUTLINE *srcline, inT16 tail_index, inT16 startindex, inT32 length, inT16 chop_coord, float pitch_error, ICOORD *tail_pos) |
inT16 | next_clock_right_seg (C_OUTLINE *srcline, inT16 tail_index, inT16 startindex, inT32 length, inT16 chop_coord, float pitch_error, ICOORD *tail_pos) |
void | save_chop_cfragment (inT16 head_index, ICOORD head_pos, inT16 tail_index, ICOORD tail_pos, C_OUTLINE *srcline, C_OUTLINE_FRAG_LIST *frags) |
void | add_frag_to_list (C_OUTLINE_FRAG *frag, C_OUTLINE_FRAG_LIST *frags) |
void | close_chopped_cfragments (C_OUTLINE_FRAG_LIST *frags, C_OUTLINE_LIST *children, float pitch_error, C_OUTLINE_IT *dest_it) |
C_OUTLINE * | join_chopped_fragments (C_OUTLINE_FRAG *bottom, C_OUTLINE_FRAG *top) |
void | join_segments (C_OUTLINE_FRAG *bottom, C_OUTLINE_FRAG *top) |
Variables | |
EXTERN int | textord_fp_chop_error = 2 |
EXTERN double | textord_fp_chop_snap = 0.5 |
FCOORD rotation BOOL8 | bol = TRUE |
uinT8 | blanks = 0 |
uinT8 | new_blanks |
inT16 | chop_coord |
inT16 | prev_chop_coord = cell_it.data ()->x () |
inT16 | rep_left = rep_it.data ()->bounding_box ().left () |
ROW * | real_row = new ROW (row, (inT16) row->kern_size, (inT16) row->space_size) |
OUTLINE_LIST | left_outlines |
OUTLINE_LIST | right_outlines |
C_OUTLINE_LIST | left_coutlines |
C_OUTLINE_LIST | right_coutlines |
PBLOB_LIST | blobs |
C_BLOB_LIST | cblobs |
PBLOB_IT | blob_it = &blobs |
C_BLOB_IT | cblob_it = &cblobs |
WERD_LIST | words |
WERD_IT | word_it = &words |
WERD_IT | rep_it = &row->rep_words |
WERD * | word = NULL |
inT32 | xstarts [2] = box_it.data ()->bounding_box ().left () |
double | coeffs [3] = 0 |
inT32 | prev_x = -MAX_INT16 |
BLOBNBOX_IT | box_it = row->blob_list () |
ICOORDELT_IT | cell_it = &row->char_cells |
word_it | TRUE |
#define EXTERN |
void add_frag_to_list | ( | C_OUTLINE_FRAG * | frag, | |
C_OUTLINE_FRAG_LIST * | frags | |||
) |
void add_frag_to_list | ( | OUTLINE_FRAG * | frag, | |
OUTLINE_FRAG_LIST * | frags | |||
) |
WERD* add_repeated_word | ( | WERD_IT * | rep_it, | |
inT16 & | rep_left, | |||
inT16 & | prev_chop_coord, | |||
uinT8 & | blanks, | |||
float | pitch, | |||
WERD_IT * | word_it | |||
) |
ASSERT_HOST | ( | word! | = NULL |
) |
ASSERT_HOST | ( | !cell_it. | empty)&&!row->char_cells.singleton( | ) |
void close_chopped_cfragments | ( | C_OUTLINE_FRAG_LIST * | frags, | |
C_OUTLINE_LIST * | children, | |||
float | pitch_error, | |||
C_OUTLINE_IT * | dest_it | |||
) |
void close_chopped_fragments | ( | OUTLINE_FRAG_LIST * | frags, | |
OUTLINE_LIST * | children, | |||
OUTLINE_IT * | dest_it | |||
) |
word_it data | ( | ) |
ELISTIZE | ( | OUTLINE_FRAG | ) |
void fixed_chop_blob | ( | PBLOB * | blob, | |
inT16 | chop_coord, | |||
float | pitch_error, | |||
OUTLINE_LIST * | left_outlines, | |||
OUTLINE_LIST * | right_outlines | |||
) |
void fixed_chop_cblob | ( | C_BLOB * | blob, | |
inT16 | chop_coord, | |||
float | pitch_error, | |||
C_OUTLINE_LIST * | left_outlines, | |||
C_OUTLINE_LIST * | right_outlines | |||
) |
BOOL8 fixed_chop_coutline | ( | C_OUTLINE * | srcline, | |
inT16 | chop_coord, | |||
float | pitch_error, | |||
C_OUTLINE_FRAG_LIST * | left_frags, | |||
C_OUTLINE_FRAG_LIST * | right_frags | |||
) |
BOOL8 fixed_chop_outline | ( | OUTLINE * | srcline, | |
inT16 | chop_coord, | |||
float | pitch_error, | |||
OUTLINE_FRAG_LIST * | left_frags, | |||
OUTLINE_FRAG_LIST * | right_frags | |||
) |
void fixed_split_coutline | ( | C_OUTLINE * | srcline, | |
inT16 | chop_coord, | |||
float | pitch_error, | |||
C_OUTLINE_IT * | left_it, | |||
C_OUTLINE_IT * | right_it | |||
) |
void fixed_split_outline | ( | OUTLINE * | srcline, | |
inT16 | chop_coord, | |||
float | pitch_error, | |||
OUTLINE_IT * | left_it, | |||
OUTLINE_IT * | right_it | |||
) |
for | ( | ;!cell_it. | cycled_list);cell_it.forward( | ) |
if | ( | prev_chop_coord | , | |
prev_x | ||||
) |
if | ( | !blob_it. | empty)||!cblob_it.empty( | ) |
if | ( | prev_chop_coord >=cell_it. | data)->x( | ) |
if | ( | cell_it. | empty)||row->char_cells.singleton( | ) |
if | ( | ) |
if | ( | box_it. | empty() | ) |
if | ( | rep_it. | empty() | ) |
if | ( | textord_show_page_cuts &&to_win! | = NULL |
) |
void insert_chop_pt | ( | POLYPT_IT * | it, | |
inT16 | chop_coord | |||
) |
void insert_extra_pt | ( | POLYPT_IT * | it | ) |
C_OUTLINE* join_chopped_fragments | ( | C_OUTLINE_FRAG * | bottom, | |
C_OUTLINE_FRAG * | top | |||
) |
void join_chopped_fragments | ( | OUTLINE_FRAG * | bottom, | |
OUTLINE_FRAG * | top | |||
) |
void join_segments | ( | C_OUTLINE_FRAG * | bottom, | |
C_OUTLINE_FRAG * | top | |||
) |
cell_it mark_cycle_pt | ( | ) |
inT16 next_anti_left_seg | ( | C_OUTLINE * | srcline, | |
inT16 | tail_index, | |||
inT16 | startindex, | |||
inT32 | length, | |||
inT16 | chop_coord, | |||
float | pitch_error, | |||
ICOORD * | tail_pos | |||
) |
inT16 next_anti_right_seg | ( | C_OUTLINE * | srcline, | |
inT16 | tail_index, | |||
inT16 | startindex, | |||
inT32 | length, | |||
inT16 | chop_coord, | |||
float | pitch_error, | |||
ICOORD * | tail_pos | |||
) |
inT16 next_clock_left_seg | ( | C_OUTLINE * | srcline, | |
inT16 | tail_index, | |||
inT16 | startindex, | |||
inT32 | length, | |||
inT16 | chop_coord, | |||
float | pitch_error, | |||
ICOORD * | tail_pos | |||
) |
inT16 next_clock_right_seg | ( | C_OUTLINE * | srcline, | |
inT16 | tail_index, | |||
inT16 | startindex, | |||
inT32 | length, | |||
inT16 | chop_coord, | |||
float | pitch_error, | |||
ICOORD * | tail_pos | |||
) |
real_row recalc_bounding_box | ( | ) |
void save_chop_cfragment | ( | inT16 | head_index, | |
ICOORD | head_pos, | |||
inT16 | tail_index, | |||
ICOORD | tail_pos, | |||
C_OUTLINE * | srcline, | |||
C_OUTLINE_FRAG_LIST * | frags | |||
) |
void save_chop_fragment | ( | POLYPT_IT * | head_it, | |
POLYPT_IT * | tail_it, | |||
OUTLINE_FRAG_LIST * | frags | |||
) |
void split_to_blob | ( | BLOBNBOX * | blob, | |
inT16 | chop_coord, | |||
float | pitch_error, | |||
OUTLINE_LIST * | left_outlines, | |||
C_OUTLINE_LIST * | left_coutlines, | |||
OUTLINE_LIST * | right_outlines, | |||
C_OUTLINE_LIST * | right_coutlines | |||
) |
while | ( | !rep_it. | empty() | ) |
while | ( | rep_left< cell_it. | data)->x( | ) |
blanks = 0 |
PBLOB_LIST blobs |
BLOBNBOX_IT box_it = row->blob_list () |
C_BLOB_LIST cblobs |
ICOORDELT_IT cell_it = &row->char_cells |
coeffs[2] = 0 |
C_OUTLINE_LIST left_coutlines |
OUTLINE_LIST left_outlines |
prev_chop_coord = cell_it.data ()->x () |
prev_x = -MAX_INT16 |
WERD_IT rep_it = &row->rep_words |
else rep_left = rep_it.data ()->bounding_box ().left () |
C_OUTLINE_LIST right_coutlines |
OUTLINE_LIST right_outlines |
EXTERN int textord_fp_chop_error = 2 |
"Max allowed bending of chop cells"
EXTERN double textord_fp_chop_snap = 0.5 |
"Max distance of chop pt from vertex"
word = NULL |
xstarts[1] = box_it.data ()->bounding_box ().left () |