20 #ifndef TESSERACT_CCSTRUCT_OCRPARA_H_ 21 #define TESSERACT_CCSTRUCT_OCRPARA_H_ 121 : justification_(justification),
123 first_indent_(first_indent),
124 body_indent_(body_indent),
125 tolerance_(tolerance) {
127 int added_margin = first_indent;
128 if (body_indent < added_margin)
129 added_margin = body_indent;
130 margin_ += added_margin;
131 first_indent_ -= added_margin;
132 body_indent_ -= added_margin;
158 bool ValidFirstLine(
int lmargin,
int lindent,
int rindent,
int rmargin)
const;
162 bool ValidBodyLine(
int lmargin,
int lindent,
int rindent,
int rmargin)
const;
165 return justification_;
174 abs(first_indent_ - body_indent_) <= tolerance_;
191 #endif // TESSERACT_CCSTRUCT_OCRPARA_H_
#define ELISTIZEH(CLASSNAME)
tesseract::ParagraphJustification justification() const
bool ValidFirstLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
const ParagraphModel * model
bool ValidBodyLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
ParagraphModel(tesseract::ParagraphJustification justification, int margin, int first_indent, int body_indent, int tolerance)
bool is_very_first_or_continuation