20 #ifndef TESSERACT_CCSTRUCT_OCRPARA_H_ 21 #define TESSERACT_CCSTRUCT_OCRPARA_H_ 23 #include "publictypes.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;
136 : justification_(
tesseract::JUSTIFICATION_UNKNOWN),
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_;
179 bool Comparable(
const ParagraphModel &other)
const;
191 #endif // TESSERACT_CCSTRUCT_OCRPARA_H_ const ParagraphModel * model
Definition: ocrpara.h:36
Definition: ocrpara.h:114
int first_indent() const
Definition: ocrpara.h:168
bool is_very_first_or_continuation
Definition: ocrpara.h:43
tesseract::ParagraphJustification justification_
Definition: ocrpara.h:184
Definition: baseapi.cpp:94
bool is_list_item
Definition: ocrpara.h:38
ParagraphModel()
Definition: ocrpara.h:135
ParagraphJustification
Definition: publictypes.h:251
int first_indent_
Definition: ocrpara.h:186
Definition: publictypes.h:255
int margin_
Definition: ocrpara.h:185
int body_indent() const
Definition: ocrpara.h:169
bool has_drop_cap
Definition: ocrpara.h:46
PARA()
Definition: ocrpara.h:31
ParagraphModel(tesseract::ParagraphJustification justification, int margin, int first_indent, int body_indent, int tolerance)
Definition: ocrpara.h:116
int tolerance_
Definition: ocrpara.h:188
bool is_flush() const
Definition: ocrpara.h:171
Definition: publictypes.h:253
int body_indent_
Definition: ocrpara.h:187
int tolerance() const
Definition: ocrpara.h:170
int margin() const
Definition: ocrpara.h:167
tesseract::ParagraphJustification justification() const
Definition: ocrpara.h:164