tesseract  5.0.0-alpha-619-ge9db
fpchop.h File Reference
#include "params.h"
#include "blobbox.h"

Go to the source code of this file.

Classes

class  C_OUTLINE_FRAG
 

Functions

ROWfixed_pitch_words (TO_ROW *row, FCOORD rotation)
 
WERDadd_repeated_word (WERD_IT *rep_it, int16_t &rep_left, int16_t &prev_chop_coord, uint8_t &blanks, float pitch, WERD_IT *word_it)
 
void split_to_blob (BLOBNBOX *blob, int16_t chop_coord, float pitch_error, C_OUTLINE_LIST *left_coutlines, C_OUTLINE_LIST *right_coutlines)
 
void fixed_chop_cblob (C_BLOB *blob, int16_t chop_coord, float pitch_error, C_OUTLINE_LIST *left_outlines, C_OUTLINE_LIST *right_outlines)
 
void fixed_split_coutline (C_OUTLINE *srcline, int16_t chop_coord, float pitch_error, C_OUTLINE_IT *left_it, C_OUTLINE_IT *right_it)
 
bool fixed_chop_coutline (C_OUTLINE *srcline, int16_t chop_coord, float pitch_error, C_OUTLINE_FRAG_LIST *left_frags, C_OUTLINE_FRAG_LIST *right_frags)
 
void save_chop_cfragment (int16_t head_index, ICOORD head_pos, int16_t 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_OUTLINEjoin_chopped_fragments (C_OUTLINE_FRAG *bottom, C_OUTLINE_FRAG *top)
 
void join_segments (C_OUTLINE_FRAG *bottom, C_OUTLINE_FRAG *top)
 

Variables

int textord_fp_chop_error = 2
 
double textord_fp_chop_snap = 0.5
 

Function Documentation

◆ add_frag_to_list()

void add_frag_to_list ( C_OUTLINE_FRAG frag,
C_OUTLINE_FRAG_LIST *  frags 
)

Definition at line 592 of file fpchop.cpp.

605  {
606  //output list
607  C_OUTLINE_FRAG_IT frag_it = frags;
608 
609  if (!frags->empty ()) {
610  for (frag_it.mark_cycle_pt (); !frag_it.cycled_list ();
611  frag_it.forward ()) {

◆ add_repeated_word()

WERD* add_repeated_word ( WERD_IT *  rep_it,
int16_t &  rep_left,
int16_t &  prev_chop_coord,
uint8_t &  blanks,
float  pitch,
WERD_IT *  word_it 
)

Definition at line 197 of file fpchop.cpp.

207  {
208  WERD *word; //word to move
209  int16_t new_blanks; //extra blanks
210 
211  if (rep_left > prev_chop_coord) {
212  new_blanks = static_cast<uint8_t>(floor ((rep_left - prev_chop_coord) / pitch + 0.5));
213  blanks += new_blanks;
214  }
215  word = rep_it->extract ();
216  prev_chop_coord = word->bounding_box ().right ();
217  word_it->add_after_then_move (word);
218  word->set_blanks (blanks);
219  rep_it->forward ();
220  if (rep_it->empty ())
221  rep_left = INT16_MAX;
222  else
223  rep_left = rep_it->data ()->bounding_box ().left ();

◆ close_chopped_cfragments()

void close_chopped_cfragments ( C_OUTLINE_FRAG_LIST *  frags,
C_OUTLINE_LIST *  children,
float  pitch_error,
C_OUTLINE_IT *  dest_it 
)

Definition at line 620 of file fpchop.cpp.

636  {
637  //iterator
638  C_OUTLINE_FRAG_IT frag_it = frags;
639  C_OUTLINE_FRAG *bottom_frag; //bottom of cut
640  C_OUTLINE_FRAG *top_frag; //top of cut
641  C_OUTLINE *outline; //new outline
642  C_OUTLINE *child; //current child
643  C_OUTLINE_IT child_it = children;
644  C_OUTLINE_IT olchild_it; //children of outline
645 
646  while (!frag_it.empty()) {
647  frag_it.move_to_first();
648  // get bottom one
649  bottom_frag = frag_it.extract();
650  frag_it.forward();
651  top_frag = frag_it.data(); // look at next
652  if ((bottom_frag->steps == nullptr && top_frag->steps == nullptr)
653  || (bottom_frag->steps != nullptr && top_frag->steps != nullptr)) {
654  if (frag_it.data_relative(1)->ycoord == top_frag->ycoord)
655  frag_it.forward();
656  }
657  top_frag = frag_it.extract();
658  if (top_frag->other_end != bottom_frag) {
659  outline = join_chopped_fragments(bottom_frag, top_frag);
660  ASSERT_HOST(outline == nullptr);
661  } else {
662  outline = join_chopped_fragments(bottom_frag, top_frag);
663  if (outline != nullptr) {
664  olchild_it.set_to_list(outline->child());
665  for (child_it.mark_cycle_pt(); !child_it.cycled_list();
666  child_it.forward()) {
667  child = child_it.data();
668  if (*child < *outline)
669  olchild_it.add_to_end(child_it.extract());
670  }
671  if (outline->bounding_box().width() > pitch_error)

◆ fixed_chop_cblob()

void fixed_chop_cblob ( C_BLOB blob,
int16_t  chop_coord,
float  pitch_error,
C_OUTLINE_LIST *  left_outlines,
C_OUTLINE_LIST *  right_outlines 
)

Definition at line 261 of file fpchop.cpp.

272  {
273  C_OUTLINE *old_right; //already there
274  C_OUTLINE_LIST new_outlines; //new right ones
275  //output iterator
276  C_OUTLINE_IT left_it = left_outlines;
277  //in/out iterator
278  C_OUTLINE_IT right_it = right_outlines;
279  C_OUTLINE_IT new_it = &new_outlines;
280  C_OUTLINE_IT blob_it; //outlines in blob
281 
282  if (!right_it.empty ()) {
283  while (!right_it.empty ()) {
284  old_right = right_it.extract ();
285  right_it.forward ();
286  fixed_split_coutline(old_right,
287  chop_coord,
288  pitch_error,
289  &left_it,
290  &new_it);
291  }
292  right_it.add_list_before (&new_outlines);
293  }
294  if (blob != nullptr) {
295  blob_it.set_to_list (blob->out_list ());
296  for (blob_it.mark_cycle_pt (); !blob_it.cycled_list ();
297  blob_it.forward ())

◆ fixed_chop_coutline()

bool fixed_chop_coutline ( C_OUTLINE srcline,
int16_t  chop_coord,
float  pitch_error,
C_OUTLINE_FRAG_LIST *  left_frags,
C_OUTLINE_FRAG_LIST *  right_frags 
)

Definition at line 387 of file fpchop.cpp.

400  {
401  bool first_frag; //fragment
402  int16_t left_edge; //of outline
403  int16_t startindex; //in first fragment
404  int32_t length; //of outline
405  int16_t stepindex; //into outline
406  int16_t head_index; //start of fragment
407  ICOORD head_pos; //start of fragment
408  int16_t tail_index; //end of fragment
409  ICOORD tail_pos; //end of fragment
410  ICOORD pos; //current point
411  int16_t first_index = 0; //first tail
412  ICOORD first_pos; //first tail
413 
414  length = srcline->pathlength ();
415  pos = srcline->start_pos ();
416  left_edge = pos.x ();
417  tail_index = 0;
418  tail_pos = pos;
419  for (stepindex = 0; stepindex < length; stepindex++) {
420  if (pos.x () < left_edge) {
421  left_edge = pos.x ();
422  tail_index = stepindex;
423  tail_pos = pos;
424  }
425  pos += srcline->step (stepindex);
426  }
427  if (left_edge >= chop_coord - pitch_error)
428  return false; //not worth it
429 
430  startindex = tail_index;
431  first_frag = true;
432  head_index = tail_index;
433  head_pos = tail_pos;
434  do {
435  do {
436  tail_pos += srcline->step (tail_index);
437  tail_index++;
438  if (tail_index == length)
439  tail_index = 0;
440  }
441  while (tail_pos.x () != chop_coord && tail_index != startindex);
442  if (tail_index == startindex) {
443  if (first_frag)
444  return false; //doesn't cross line
445  else
446  break;
447  }
448  ASSERT_HOST (head_index != tail_index);
449  if (!first_frag) {
450  save_chop_cfragment(head_index,
451  head_pos,
452  tail_index,
453  tail_pos,
454  srcline,
455  left_frags);
456  }
457  else {
458  first_index = tail_index;
459  first_pos = tail_pos;
460  first_frag = false;
461  }
462  while (srcline->step (tail_index).x () == 0) {
463  tail_pos += srcline->step (tail_index);
464  tail_index++;
465  if (tail_index == length)
466  tail_index = 0;
467  }
468  head_index = tail_index;
469  head_pos = tail_pos;
470  while (srcline->step (tail_index).x () > 0) {
471  do {
472  tail_pos += srcline->step (tail_index);
473  tail_index++;
474  if (tail_index == length)
475  tail_index = 0;
476  }
477  while (tail_pos.x () != chop_coord);
478  ASSERT_HOST (head_index != tail_index);
479  save_chop_cfragment(head_index,
480  head_pos,
481  tail_index,
482  tail_pos,
483  srcline,
484  right_frags);
485  while (srcline->step (tail_index).x () == 0) {
486  tail_pos += srcline->step (tail_index);
487  tail_index++;
488  if (tail_index == length)
489  tail_index = 0;
490  }
491  head_index = tail_index;
492  head_pos = tail_pos;
493  }
494  }
495  while (tail_index != startindex);
496  save_chop_cfragment(head_index,

◆ fixed_pitch_words()

ROW* fixed_pitch_words ( TO_ROW row,
FCOORD  rotation 
)

Definition at line 42 of file fpchop.cpp.

47  {
48  bool bol; //start of line
49  uint8_t blanks; //in front of word
50  uint8_t new_blanks; //blanks in empty cell
51  int16_t chop_coord; //chop boundary
52  int16_t prev_chop_coord; //start of cell
53  int16_t rep_left; //left edge of rep word
54  ROW *real_row; //output row
55  C_OUTLINE_LIST left_coutlines;
56  C_OUTLINE_LIST right_coutlines;
57  C_BLOB_LIST cblobs;
58  C_BLOB_IT cblob_it = &cblobs;
59  WERD_LIST words;
60  WERD_IT word_it = &words; //new words
61  //repeated blobs
62  WERD_IT rep_it = &row->rep_words;
63  WERD *word; //new word
64  int32_t xstarts[2]; //row ends
65  int32_t prev_x; //end of prev blob
66  //iterator
67  BLOBNBOX_IT box_it = row->blob_list ();
68  //boundaries
69  ICOORDELT_IT cell_it = &row->char_cells;
70 
71 #ifndef GRAPHICS_DISABLED
72  if (textord_show_page_cuts && to_win != nullptr) {
74  }
75 #endif
76 
77  prev_x = -INT16_MAX;
78  bol = true;
79  blanks = 0;
80  if (rep_it.empty ())
81  rep_left = INT16_MAX;
82  else
83  rep_left = rep_it.data ()->bounding_box ().left ();
84  if (box_it.empty ())
85  return nullptr; //empty row
86  xstarts[0] = box_it.data ()->bounding_box ().left ();
87  if (rep_left < xstarts[0]) {
88  xstarts[0] = rep_left;
89  }
90  if (cell_it.empty () || row->char_cells.singleton ()) {
91  tprintf ("Row without enough char cells!\n");
92  tprintf ("Leftmost blob is at (%d,%d)\n",
93  box_it.data ()->bounding_box ().left (),
94  box_it.data ()->bounding_box ().bottom ());
95  return nullptr;
96  }
97  ASSERT_HOST (!cell_it.empty () && !row->char_cells.singleton ());
98  prev_chop_coord = cell_it.data ()->x ();
99  word = nullptr;
100  while (rep_left < cell_it.data ()->x ()) {
101  word = add_repeated_word (&rep_it, rep_left, prev_chop_coord,
102  blanks, row->fixed_pitch, &word_it);
103  }
104  cell_it.mark_cycle_pt ();
105  if (prev_chop_coord >= cell_it.data ()->x ())
106  cell_it.forward ();
107  for (; !cell_it.cycled_list (); cell_it.forward ()) {
108  chop_coord = cell_it.data ()->x ();
109  while (!box_it.empty ()
110  && box_it.data ()->bounding_box ().left () <= chop_coord) {
111  if (box_it.data ()->bounding_box ().right () > prev_x)
112  prev_x = box_it.data ()->bounding_box ().right ();
113  split_to_blob (box_it.extract (), chop_coord,
114  textord_fp_chop_error + 0.5f,
115  &left_coutlines,
116  &right_coutlines);
117  box_it.forward ();
118  while (!box_it.empty() && box_it.data()->cblob() == nullptr) {
119  delete box_it.extract();
120  box_it.forward();
121  }
122  }
123  if (!right_coutlines.empty() && left_coutlines.empty())
124  split_to_blob (nullptr, chop_coord,
125  textord_fp_chop_error + 0.5f,
126  &left_coutlines,
127  &right_coutlines);
128  if (!left_coutlines.empty()) {
129  cblob_it.add_after_then_move(new C_BLOB(&left_coutlines));
130  } else {
131  if (rep_left < chop_coord) {
132  if (rep_left > prev_chop_coord)
133  new_blanks = static_cast<uint8_t>(floor ((rep_left - prev_chop_coord)
134  / row->fixed_pitch + 0.5));
135  else
136  new_blanks = 0;
137  }
138  else {
139  if (chop_coord > prev_chop_coord)
140  new_blanks = static_cast<uint8_t>(floor ((chop_coord - prev_chop_coord)
141  / row->fixed_pitch + 0.5));
142  else
143  new_blanks = 0;
144  }
145  if (!cblob_it.empty()) {
146  if (blanks < 1 && word != nullptr && !word->flag (W_REP_CHAR))
147  blanks = 1;
148  word = new WERD (&cblobs, blanks, nullptr);
149  cblob_it.set_to_list (&cblobs);
150  word->set_flag (W_DONT_CHOP, true);
151  word_it.add_after_then_move (word);
152  if (bol) {
153  word->set_flag (W_BOL, true);
154  bol = false;
155  }
156  blanks = new_blanks;
157  }
158  else
159  blanks += new_blanks;
160  while (rep_left < chop_coord) {
161  word = add_repeated_word (&rep_it, rep_left, prev_chop_coord,
162  blanks, row->fixed_pitch, &word_it);
163  }
164  }
165  if (prev_chop_coord < chop_coord)
166  prev_chop_coord = chop_coord;
167  }
168  if (!cblob_it.empty()) {
169  word = new WERD(&cblobs, blanks, nullptr);
170  word->set_flag (W_DONT_CHOP, true);
171  word_it.add_after_then_move (word);
172  if (bol)
173  word->set_flag (W_BOL, true);
174  }
175  ASSERT_HOST (word != nullptr);
176  while (!rep_it.empty ()) {
177  add_repeated_word (&rep_it, rep_left, prev_chop_coord,
178  blanks, row->fixed_pitch, &word_it);
179  }
180  //at end of line
181  word_it.data ()->set_flag (W_EOL, true);
182  if (prev_chop_coord > prev_x)
183  prev_x = prev_chop_coord;
184  xstarts[1] = prev_x + 1;
185  real_row = new ROW (row, static_cast<int16_t>(row->kern_size), static_cast<int16_t>(row->space_size));
186  word_it.set_to_list (real_row->word_list ());
187  //put words in row
188  word_it.add_list_after (&words);
189  real_row->recalc_bounding_box ();

◆ fixed_split_coutline()

void fixed_split_coutline ( C_OUTLINE srcline,
int16_t  chop_coord,
float  pitch_error,
C_OUTLINE_IT *  left_it,
C_OUTLINE_IT *  right_it 
)

Definition at line 306 of file fpchop.cpp.

318  {
319  C_OUTLINE *child; //child outline
320  TBOX srcbox; //box of outline
321  C_OUTLINE_LIST left_ch; //left children
322  C_OUTLINE_LIST right_ch; //right children
323  C_OUTLINE_FRAG_LIST left_frags;//chopped fragments
324  C_OUTLINE_FRAG_LIST right_frags;;
325  C_OUTLINE_IT left_ch_it = &left_ch;
326  //for whole children
327  C_OUTLINE_IT right_ch_it = &right_ch;
328  //for holes
329  C_OUTLINE_IT child_it = srcline->child ();
330 
331  srcbox = srcline->bounding_box();
332  if (srcbox.left() + srcbox.right() <= chop_coord * 2
333  && srcbox.right() < chop_coord + pitch_error) {
334  // Whole outline is in the left side or not far over the chop_coord,
335  // so put the whole thing on the left.
336  left_it->add_after_then_move(srcline);
337  } else if (srcbox.left() + srcbox.right() > chop_coord * 2
338  && srcbox.left () > chop_coord - pitch_error) {
339  // Whole outline is in the right side or not far over the chop_coord,
340  // so put the whole thing on the right.
341  right_it->add_before_stay_put(srcline);
342  } else {
343  // Needs real chopping.
344  if (fixed_chop_coutline(srcline, chop_coord, pitch_error,
345  &left_frags, &right_frags)) {
346  for (child_it.mark_cycle_pt(); !child_it.cycled_list();
347  child_it.forward()) {
348  child = child_it.extract();
349  srcbox = child->bounding_box();
350  if (srcbox.right() < chop_coord) {
351  // Whole child is on the left.
352  left_ch_it.add_after_then_move(child);
353  } else if (srcbox.left() > chop_coord) {
354  // Whole child is on the right.
355  right_ch_it.add_after_then_move (child);
356  } else {
357  // No pitch_error is allowed when chopping children to prevent
358  // impossible outlines from being created.
359  if (fixed_chop_coutline(child, chop_coord, 0.0f,
360  &left_frags, &right_frags)) {
361  delete child;
362  } else {
363  if (srcbox.left() + srcbox.right() <= chop_coord * 2)
364  left_ch_it.add_after_then_move(child);
365  else
366  right_ch_it.add_after_then_move(child);
367  }
368  }
369  }
370  close_chopped_cfragments(&left_frags, &left_ch, pitch_error, left_it);
371  close_chopped_cfragments(&right_frags, &right_ch, pitch_error, right_it);
372  ASSERT_HOST(left_ch.empty() && right_ch.empty());
373  // No children left.
374  delete srcline; // Smashed up.
375  } else {
376  // Chop failed. Just use middle coord.
377  if (srcbox.left() + srcbox.right() <= chop_coord * 2)

◆ join_chopped_fragments()

C_OUTLINE* join_chopped_fragments ( C_OUTLINE_FRAG bottom,
C_OUTLINE_FRAG top 
)

Definition at line 680 of file fpchop.cpp.

695  {
696  C_OUTLINE *outline; //closed loop
697 
698  if (bottom->other_end == top) {
699  if (bottom->steps == nullptr)
700  outline = top->close (); //turn to outline
701  else
702  outline = bottom->close ();
703  delete top;
704  delete bottom;
705  return outline;
706  }
707  if (bottom->steps == nullptr) {
708  ASSERT_HOST (top->steps != nullptr);

◆ join_segments()

void join_segments ( C_OUTLINE_FRAG bottom,
C_OUTLINE_FRAG top 
)

Definition at line 716 of file fpchop.cpp.

732  {
733  DIR128 *steps; //new steps
734  int32_t stepcount; //no of steps
735  int16_t fake_count; //fake steps
736  DIR128 fake_step; //step entry
737 
738  ASSERT_HOST (bottom->end.x () == top->start.x ());
739  fake_count = top->start.y () - bottom->end.y ();
740  if (fake_count < 0) {
741  fake_count = -fake_count;
742  fake_step = 32;
743  }
744  else
745  fake_step = 96;

◆ save_chop_cfragment()

void save_chop_cfragment ( int16_t  head_index,
ICOORD  head_pos,
int16_t  tail_index,
ICOORD  tail_pos,
C_OUTLINE srcline,
C_OUTLINE_FRAG_LIST *  frags 
)

Definition at line 503 of file fpchop.cpp.

518  {
519  int16_t jump; //gap across end
520  int16_t stepcount; //total steps
521  C_OUTLINE_FRAG *head; //head of fragment
522  C_OUTLINE_FRAG *tail; //tail of fragment
523  int16_t tail_y; //ycoord of tail
524 
525  ASSERT_HOST (tail_pos.x () == head_pos.x ());
526  ASSERT_HOST (tail_index != head_index);
527  stepcount = tail_index - head_index;
528  if (stepcount < 0)
529  stepcount += srcline->pathlength ();
530  jump = tail_pos.y () - head_pos.y ();
531  if (jump < 0)
532  jump = -jump;
533  if (jump == stepcount)
534  return; //its a nop

◆ split_to_blob()

void split_to_blob ( BLOBNBOX blob,
int16_t  chop_coord,
float  pitch_error,
C_OUTLINE_LIST *  left_coutlines,
C_OUTLINE_LIST *  right_coutlines 
)

Definition at line 232 of file fpchop.cpp.

241  {
242  C_BLOB *real_cblob; //cblob to chop
243 
244  if (blob != nullptr) {
245  real_cblob = blob->cblob();
246  } else {
247  real_cblob = nullptr;
248  }
249  if (!right_coutlines->empty() || real_cblob != nullptr)
250  fixed_chop_cblob(real_cblob,
251  chop_coord,
252  pitch_error,
253  left_coutlines,

Variable Documentation

◆ textord_fp_chop_error

int textord_fp_chop_error = 2

"Max allowed bending of chop cells"

Definition at line 31 of file fpchop.cpp.

◆ textord_fp_chop_snap

double textord_fp_chop_snap = 0.5

"Max distance of chop pt from vertex"

Definition at line 33 of file fpchop.cpp.

split_to_blob
void split_to_blob(BLOBNBOX *blob, int16_t chop_coord, float pitch_error, C_OUTLINE_LIST *left_coutlines, C_OUTLINE_LIST *right_coutlines)
Definition: fpchop.cpp:232
TO_ROW::rep_words
WERD_LIST rep_words
Definition: blobbox.h:667
TO_ROW::space_size
float space_size
Definition: blobbox.h:666
C_BLOB::out_list
C_OUTLINE_LIST * out_list()
Definition: stepblob.h:69
W_REP_CHAR
repeated character
Definition: werd.h:52
DIR128
Definition: mod128.h:28
W_DONT_CHOP
fixed pitch chopped
Definition: werd.h:51
ASSERT_HOST
#define ASSERT_HOST(x)
Definition: errcode.h:87
C_OUTLINE_FRAG::end
ICOORD end
Definition: fpchop.h:62
WERD::bounding_box
TBOX bounding_box() const
Definition: werd.cpp:147
C_OUTLINE_FRAG
Definition: fpchop.h:24
ICOORD
integer coordinate
Definition: points.h:30
C_OUTLINE_FRAG::start
ICOORD start
Definition: fpchop.h:61
ROW::recalc_bounding_box
void recalc_bounding_box()
Definition: ocrrow.cpp:96
fixed_split_coutline
void fixed_split_coutline(C_OUTLINE *srcline, int16_t chop_coord, float pitch_error, C_OUTLINE_IT *left_it, C_OUTLINE_IT *right_it)
Definition: fpchop.cpp:306
plot_row_cells
void plot_row_cells(ScrollView *win, ScrollView::Color colour, TO_ROW *row, float xshift, ICOORDELT_LIST *cells)
Definition: drawtord.cpp:383
textord_fp_chop_error
int textord_fp_chop_error
Definition: fpchop.cpp:31
ICOORD::x
int16_t x() const
access function
Definition: points.h:51
C_OUTLINE_FRAG::other_end
C_OUTLINE_FRAG * other_end
Definition: fpchop.h:65
C_BLOB
Definition: stepblob.h:36
C_OUTLINE
Definition: coutln.h:71
textord_show_page_cuts
bool textord_show_page_cuts
Definition: topitch.cpp:46
close_chopped_cfragments
void close_chopped_cfragments(C_OUTLINE_FRAG_LIST *frags, C_OUTLINE_LIST *children, float pitch_error, C_OUTLINE_IT *dest_it)
Definition: fpchop.cpp:620
WERD::set_flag
void set_flag(WERD_FLAGS mask, bool value)
Definition: werd.h:117
C_OUTLINE_FRAG::steps
DIR128 * steps
Definition: fpchop.h:63
W_EOL
end of line
Definition: werd.h:47
TBOX::width
int16_t width() const
Definition: rect.h:114
join_chopped_fragments
C_OUTLINE * join_chopped_fragments(C_OUTLINE_FRAG *bottom, C_OUTLINE_FRAG *top)
Definition: fpchop.cpp:680
save_chop_cfragment
void save_chop_cfragment(int16_t head_index, ICOORD head_pos, int16_t tail_index, ICOORD tail_pos, C_OUTLINE *srcline, C_OUTLINE_FRAG_LIST *frags)
Definition: fpchop.cpp:503
TO_ROW::fixed_pitch
float fixed_pitch
Definition: blobbox.h:650
ScrollView::RED
Definition: scrollview.h:104
C_OUTLINE_FRAG::ycoord
int16_t ycoord
Definition: fpchop.h:66
WERD
Definition: werd.h:55
TBOX::left
int16_t left() const
Definition: rect.h:71
ROW
Definition: ocrrow.h:35
C_OUTLINE::bounding_box
const TBOX & bounding_box() const
Definition: coutln.h:112
TBOX::right
int16_t right() const
Definition: rect.h:78
tprintf
DLLSYM void tprintf(const char *format,...)
Definition: tprintf.cpp:34
TO_ROW::char_cells
ICOORDELT_LIST char_cells
Definition: blobbox.h:668
WERD::set_blanks
void set_blanks(uint8_t new_blanks)
Definition: werd.h:101
C_OUTLINE::pathlength
int32_t pathlength() const
Definition: coutln.h:134
TO_ROW::kern_size
float kern_size
Definition: blobbox.h:665
C_OUTLINE::step
ICOORD step(int index) const
Definition: coutln.h:143
BLOBNBOX::cblob
C_BLOB * cblob() const
Definition: blobbox.h:267
C_OUTLINE_FRAG::close
C_OUTLINE * close()
Definition: fpchop.cpp:753
add_repeated_word
WERD * add_repeated_word(WERD_IT *rep_it, int16_t &rep_left, int16_t &prev_chop_coord, uint8_t &blanks, float pitch, WERD_IT *word_it)
Definition: fpchop.cpp:197
C_OUTLINE::child
C_OUTLINE_LIST * child()
Definition: coutln.h:107
fixed_chop_coutline
bool fixed_chop_coutline(C_OUTLINE *srcline, int16_t chop_coord, float pitch_error, C_OUTLINE_FRAG_LIST *left_frags, C_OUTLINE_FRAG_LIST *right_frags)
Definition: fpchop.cpp:387
ROW::word_list
WERD_LIST * word_list()
Definition: ocrrow.h:54
fixed_chop_cblob
void fixed_chop_cblob(C_BLOB *blob, int16_t chop_coord, float pitch_error, C_OUTLINE_LIST *left_outlines, C_OUTLINE_LIST *right_outlines)
Definition: fpchop.cpp:261
to_win
ScrollView * to_win
Definition: drawtord.cpp:34
C_OUTLINE::start_pos
const ICOORD & start_pos() const
Definition: coutln.h:147
W_BOL
start of line
Definition: werd.h:46
TO_ROW::blob_list
BLOBNBOX_LIST * blob_list()
Definition: blobbox.h:599
ICOORD::y
int16_t y() const
access_function
Definition: points.h:55
TBOX
Definition: rect.h:33