903 for (word_it.mark_cycle_pt (); !word_it.cycled_list (); word_it.forward ()) {
904 word = word_it.data ();
914 (
double *)
alloc_mem ((blob_count + row->baseline.segments) * 3 *
919 xstarts[0] = row->baseline.xcoords[0];
920 for (word_it.mark_cycle_pt (); !word_it.cycled_list (); word_it.forward ()) {
921 word = word_it.data ();
924 for (blob_it.mark_cycle_pt (); !blob_it.cycled_list ();
925 blob_it.forward ()) {
926 blob = blob_it.data ();
928 x_centre = (blob_box.
left () + blob_box.
right ()) / 2.0;
934 if (ydiff < blshift_maxshift
936 if (xstarts[dest_index] >= x_centre)
937 xstarts[dest_index] = blob_box.
left ();
938 coeffs[dest_index * 3] = 0;
939 coeffs[dest_index * 3 + 1] = 0;
940 coeffs[dest_index * 3 + 2] = blob_box.
bottom ();
943 xstarts[dest_index] = blob_box.
right () + 1;
946 if (xstarts[dest_index] <= x_centre) {
947 while (row->baseline.xcoords[src_index + 1] <= x_centre
948 && src_index < row->
baseline.segments - 1) {
949 if (row->baseline.xcoords[src_index + 1] >
950 xstarts[dest_index]) {
951 coeffs[dest_index * 3] =
952 row->baseline.quadratics[src_index].
a;
953 coeffs[dest_index * 3 + 1] =
954 row->baseline.quadratics[src_index].
b;
955 coeffs[dest_index * 3 + 2] =
956 row->baseline.quadratics[src_index].
c;
958 xstarts[dest_index] =
959 row->baseline.xcoords[src_index + 1];
963 coeffs[dest_index * 3] =
964 row->baseline.quadratics[src_index].
a;
965 coeffs[dest_index * 3 + 1] =
966 row->baseline.quadratics[src_index].
b;
967 coeffs[dest_index * 3 + 2] =
968 row->baseline.quadratics[src_index].
c;
970 xstarts[dest_index] = row->baseline.xcoords[src_index + 1];
975 while (src_index < row->
baseline.segments
976 && row->baseline.xcoords[src_index + 1] <= xstarts[dest_index])
978 while (src_index < row->
baseline.segments) {
979 coeffs[dest_index * 3] = row->baseline.quadratics[src_index].
a;
980 coeffs[dest_index * 3 + 1] = row->baseline.quadratics[src_index].
b;
981 coeffs[dest_index * 3 + 2] = row->baseline.quadratics[src_index].
c;
984 xstarts[dest_index] = row->baseline.xcoords[src_index];
987 row->baseline =
QSPLINE (dest_index, xstarts, coeffs);
float base_line(float xpos) const
TBOX bounding_box() const
void * alloc_mem(inT32 count)
void free_mem(void *oldchunk)
C_BLOB_LIST * cblob_list()