793 {
795 if (norm_box != nullptr) word_box = *norm_box;
796 float word_middle = (word_box.
left() + word_box.
right()) / 2.0f;
797 float input_y_offset = 0.0f;
800 if (row == nullptr) {
801 word_middle = word_box.
left();
802 input_y_offset = word_box.
bottom();
803 final_y_offset = 0.0f;
804 } else {
805 input_y_offset = row->
base_line(word_middle) + baseline_shift;
806 }
810 float mid_x = (blob_box.
left() + blob_box.
right()) / 2.0f;
812 float blob_scale = scale;
813 if (numeric_mode) {
816 scale, scale * 1.5f);
817 } else if (row != nullptr) {
819 }
820
821
822
823
824
825
827 blob_scale, 0.0f, final_y_offset, inverse, pix);
828 }
829 if (word_denorm != nullptr) {
831 input_y_offset, scale, scale, 0.0f,
832 final_y_offset);
835 }
836}
const int kBlnBaselineOffset
T ClipToRange(const T &x, const T &lower_bound, const T &upper_bound)
TBOX bounding_box() const
void Normalize(const BLOCK *block, const FCOORD *rotation, const DENORM *predecessor, float x_origin, float y_origin, float x_scale, float y_scale, float final_xshift, float final_yshift, bool inverse, Pix *pix)
GenericVector< TBLOB * > blobs
TBOX bounding_box() const
void set_inverse(bool value)
void SetupNormalization(const BLOCK *block, const FCOORD *rotation, const DENORM *predecessor, float x_origin, float y_origin, float x_scale, float y_scale, float final_xshift, float final_yshift)
float base_line(float xpos) const