698 for (word_it.mark_cycle_pt (); !word_it.cycled_list (); word_it.forward ()) {
699 word = word_it.data ();
709 (
double *)
alloc_mem ((blob_count + row->baseline.segments) * 3 *
714 xstarts[0] = row->baseline.xcoords[0];
715 for (word_it.mark_cycle_pt (); !word_it.cycled_list (); word_it.forward ()) {
716 word = word_it.data ();
719 for (blob_it.mark_cycle_pt (); !blob_it.cycled_list ();
720 blob_it.forward ()) {
721 blob = blob_it.data ();
723 x_centre = (blob_box.
left () + blob_box.
right ()) / 2.0;
729 if (ydiff < blshift_maxshift
731 if (xstarts[dest_index] >= x_centre)
732 xstarts[dest_index] = blob_box.
left ();
733 coeffs[dest_index * 3] = 0;
734 coeffs[dest_index * 3 + 1] = 0;
735 coeffs[dest_index * 3 + 2] = blob_box.
bottom ();
738 xstarts[dest_index] = blob_box.
right () + 1;
741 if (xstarts[dest_index] <= x_centre) {
742 while (row->baseline.xcoords[src_index + 1] <= x_centre
743 && src_index < row->
baseline.segments - 1) {
744 if (row->baseline.xcoords[src_index + 1] >
745 xstarts[dest_index]) {
746 coeffs[dest_index * 3] =
747 row->baseline.quadratics[src_index].
a;
748 coeffs[dest_index * 3 + 1] =
749 row->baseline.quadratics[src_index].
b;
750 coeffs[dest_index * 3 + 2] =
751 row->baseline.quadratics[src_index].
c;
753 xstarts[dest_index] =
754 row->baseline.xcoords[src_index + 1];
758 coeffs[dest_index * 3] =
759 row->baseline.quadratics[src_index].
a;
760 coeffs[dest_index * 3 + 1] =
761 row->baseline.quadratics[src_index].
b;
762 coeffs[dest_index * 3 + 2] =
763 row->baseline.quadratics[src_index].
c;
765 xstarts[dest_index] = row->baseline.xcoords[src_index + 1];
770 while (src_index < row->
baseline.segments
771 && row->baseline.xcoords[src_index + 1] <= xstarts[dest_index])
773 while (src_index < row->
baseline.segments) {
774 coeffs[dest_index * 3] = row->baseline.quadratics[src_index].
a;
775 coeffs[dest_index * 3 + 1] = row->baseline.quadratics[src_index].
b;
776 coeffs[dest_index * 3 + 2] = row->baseline.quadratics[src_index].
c;
779 xstarts[dest_index] = row->baseline.xcoords[src_index];
782 row->baseline =
QSPLINE (dest_index, xstarts, coeffs);
C_BLOB_LIST * cblob_list()
void free_mem(void *oldchunk)
void * alloc_mem(inT32 count)
float base_line(float xpos) const