805 if (norm_box !=
nullptr) word_box = *norm_box;
806 float word_middle = (word_box.
left() + word_box.
right()) / 2.0f;
807 float input_y_offset = 0.0f;
810 if (row ==
nullptr) {
811 word_middle = word_box.
left();
812 input_y_offset = word_box.
bottom();
813 final_y_offset = 0.0f;
815 input_y_offset = row->
base_line(word_middle) + baseline_shift;
820 float mid_x = (blob_box.
left() + blob_box.
right()) / 2.0f;
822 float blob_scale = scale;
826 scale, scale * 1.5f);
827 }
else if (row !=
nullptr) {
837 blob_scale, 0.0f, final_y_offset, inverse, pix);
839 if (word_denorm !=
nullptr) {
841 input_y_offset, scale, scale, 0.0f,
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
TBOX bounding_box() const
const int kBlnBaselineOffset
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)
TBOX bounding_box() const
void set_inverse(bool value)
GenericVector< TBLOB * > blobs
T ClipToRange(const T &x, const T &lower_bound, const T &upper_bound)