19#ifndef TESSERACT_CCSTRUCT_OCRPARA_H_
20#define TESSERACT_CCSTRUCT_OCRPARA_H_
121 int body_indent,
int tolerance)
122 : justification_(justification)
124 , first_indent_(first_indent)
125 , body_indent_(body_indent)
126 , tolerance_(tolerance) {
128 int added_margin = first_indent;
129 if (body_indent < added_margin) {
130 added_margin = body_indent;
132 margin_ += added_margin;
133 first_indent_ -= added_margin;
134 body_indent_ -= added_margin;
160 bool ValidFirstLine(
int lmargin,
int lindent,
int rindent,
int rmargin)
const;
164 bool ValidBodyLine(
int lmargin,
int lindent,
int rindent,
int rmargin)
const;
167 return justification_;
173 return first_indent_;
184 abs(first_indent_ - body_indent_) <= tolerance_;
191 std::string ToString()
const;
#define ELISTIZEH(CLASSNAME)
bool ValidBodyLine(const std::vector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
bool ValidFirstLine(const std::vector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
const ParagraphModel * model
bool is_very_first_or_continuation
tesseract::ParagraphJustification justification() const
ParagraphModel(tesseract::ParagraphJustification justification, int margin, int first_indent, int body_indent, int tolerance)