|
Tesseract
3.02
|
#include <blobbox.h>
Public Member Functions | |
| BLOBNBOX () | |
| BLOBNBOX (C_BLOB *srcblob) | |
| void | rotate (FCOORD rotation) |
| void | reflect_box_in_y_axis () |
| void | rotate_box (FCOORD rotation) |
| void | translate_box (ICOORD v) |
| void | merge (BLOBNBOX *nextblob) |
| void | really_merge (BLOBNBOX *other) |
| void | chop (BLOBNBOX_IT *start_it, BLOBNBOX_IT *blob_it, FCOORD rotation, float xheight) |
| void | NeighbourGaps (int gaps[BND_COUNT]) const |
| void | MinMaxGapsClipped (int *h_min, int *h_max, int *v_min, int *v_max) const |
| void | CleanNeighbours () |
| int | GoodTextBlob () const |
| int | NoisyNeighbours () const |
| bool | DeletableNoise () const |
| bool | DefiniteIndividualFlow () |
| bool | ConfirmNoTabViolation (const BLOBNBOX &other) const |
| bool | MatchingStrokeWidth (const BLOBNBOX &other, double fractional_tolerance, double constant_tolerance) const |
| TBOX | BoundsWithinLimits (int left, int right) |
| const TBOX & | bounding_box () const |
| void | set_bounding_box (const TBOX &new_box) |
| void | compute_bounding_box () |
| const TBOX & | reduced_box () const |
| void | set_reduced_box (TBOX new_box) |
| inT32 | enclosed_area () const |
| bool | joined_to_prev () const |
| bool | red_box_set () const |
| int | repeated_set () const |
| void | set_repeated_set (int set_id) |
| C_BLOB * | cblob () const |
| TabType | left_tab_type () const |
| void | set_left_tab_type (TabType new_type) |
| TabType | right_tab_type () const |
| void | set_right_tab_type (TabType new_type) |
| BlobRegionType | region_type () const |
| void | set_region_type (BlobRegionType new_type) |
| BlobSpecialTextType | special_text_type () const |
| void | set_special_text_type (BlobSpecialTextType new_type) |
| BlobTextFlowType | flow () const |
| void | set_flow (BlobTextFlowType value) |
| bool | vert_possible () const |
| void | set_vert_possible (bool value) |
| bool | horz_possible () const |
| void | set_horz_possible (bool value) |
| int | left_rule () const |
| void | set_left_rule (int new_left) |
| int | right_rule () const |
| void | set_right_rule (int new_right) |
| int | left_crossing_rule () const |
| void | set_left_crossing_rule (int new_left) |
| int | right_crossing_rule () const |
| void | set_right_crossing_rule (int new_right) |
| float | horz_stroke_width () const |
| void | set_horz_stroke_width (float width) |
| float | vert_stroke_width () const |
| void | set_vert_stroke_width (float width) |
| float | area_stroke_width () const |
| tesseract::ColPartition * | owner () const |
| void | set_owner (tesseract::ColPartition *new_owner) |
| bool | leader_on_left () const |
| void | set_leader_on_left (bool flag) |
| bool | leader_on_right () const |
| void | set_leader_on_right (bool flag) |
| BLOBNBOX * | neighbour (BlobNeighbourDir n) const |
| bool | good_stroke_neighbour (BlobNeighbourDir n) const |
| void | set_neighbour (BlobNeighbourDir n, BLOBNBOX *neighbour, bool good) |
| bool | IsDiacritic () const |
| int | base_char_top () const |
| int | base_char_bottom () const |
| int | line_crossings () const |
| void | set_line_crossings (int value) |
| void | set_diacritic_box (const TBOX &diacritic_box) |
| BLOBNBOX * | base_char_blob () const |
| void | set_base_char_blob (BLOBNBOX *blob) |
| bool | UniquelyVertical () const |
| bool | UniquelyHorizontal () const |
| ScrollView::Color | BoxColor () const |
| void | plot (ScrollView *window, ScrollView::Color blob_colour, ScrollView::Color child_colour) |
| void | ConstructionInit () |
| void | ReInit () |
| void | ClearNeighbours () |
Static Public Member Functions | |
| static BLOBNBOX * | RealBlob (C_OUTLINE *outline) |
| static bool | IsTextType (BlobRegionType type) |
| static bool | IsImageType (BlobRegionType type) |
| static bool | IsLineType (BlobRegionType type) |
| static bool | UnMergeableType (BlobRegionType type) |
| static void | CleanNeighbours (BLOBNBOX_LIST *blobs) |
| static void | DeleteNoiseBlobs (BLOBNBOX_LIST *blobs) |
| static void | PlotBlobs (BLOBNBOX_LIST *list, ScrollView::Color body_colour, ScrollView::Color child_colour, ScrollView *win) |
| static void | PlotNoiseBlobs (BLOBNBOX_LIST *list, ScrollView::Color body_colour, ScrollView::Color child_colour, ScrollView *win) |
| static ScrollView::Color | TextlineColor (BlobRegionType region_type, BlobTextFlowType flow_type) |
| BLOBNBOX::BLOBNBOX | ( | ) | [inline] |
Definition at line 131 of file blobbox.h.
{
ConstructionInit();
}
| BLOBNBOX::BLOBNBOX | ( | C_BLOB * | srcblob | ) | [inline, explicit] |
Definition at line 134 of file blobbox.h.
{
box = srcblob->bounding_box();
ConstructionInit();
cblob_ptr = srcblob;
area = static_cast<int>(srcblob->area());
}
| float BLOBNBOX::area_stroke_width | ( | ) | const [inline] |
| BLOBNBOX* BLOBNBOX::base_char_blob | ( | ) | const [inline] |
| int BLOBNBOX::base_char_bottom | ( | ) | const [inline] |
| int BLOBNBOX::base_char_top | ( | ) | const [inline] |
| const TBOX& BLOBNBOX::bounding_box | ( | ) | const [inline] |
| TBOX BLOBNBOX::BoundsWithinLimits | ( | int | left, |
| int | right | ||
| ) |
Definition at line 318 of file blobbox.cpp.
{
FCOORD no_rotation(1.0f, 0.0f);
float top = box.top();
float bottom = box.bottom();
if (cblob_ptr != NULL) {
find_cblob_limits(cblob_ptr, static_cast<float>(left),
static_cast<float>(right), no_rotation,
bottom, top);
}
if (top < bottom) {
top = box.top();
bottom = box.bottom();
}
FCOORD bot_left(left, bottom);
FCOORD top_right(right, top);
TBOX shrunken_box(bot_left);
TBOX shrunken_box2(top_right);
shrunken_box += shrunken_box2;
return shrunken_box;
}
| ScrollView::Color BLOBNBOX::BoxColor | ( | ) | const |
Definition at line 425 of file blobbox.cpp.
{
return TextlineColor(region_type_, flow_);
}
| C_BLOB* BLOBNBOX::cblob | ( | ) | const [inline] |
| void BLOBNBOX::chop | ( | BLOBNBOX_IT * | start_it, |
| BLOBNBOX_IT * | blob_it, | ||
| FCOORD | rotation, | ||
| float | xheight | ||
| ) |
Definition at line 106 of file blobbox.cpp.
{
inT16 blobcount; //no of blobs
BLOBNBOX *newblob; //fake blob
BLOBNBOX *blob; //current blob
inT16 blobindex; //number of chop
inT16 leftx; //left edge of blob
float blobwidth; //width of each
float rightx; //right edge to scan
float ymin, ymax; //limits of new blob
float test_ymin, test_ymax; //limits of part blob
ICOORD bl, tr; //corners of box
BLOBNBOX_IT blob_it; //blob iterator
//get no of chops
blobcount = (inT16) floor (box.width () / xheight);
if (blobcount > 1 && cblob_ptr != NULL) {
//width of each
blobwidth = (float) (box.width () + 1) / blobcount;
for (blobindex = blobcount - 1, rightx = box.right ();
blobindex >= 0; blobindex--, rightx -= blobwidth) {
ymin = (float) MAX_INT32;
ymax = (float) -MAX_INT32;
blob_it = *start_it;
do {
blob = blob_it.data ();
find_cblob_vlimits(blob->cblob_ptr, rightx - blobwidth,
rightx,
/*rotation, */ test_ymin, test_ymax);
blob_it.forward ();
UpdateRange(test_ymin, test_ymax, &ymin, &ymax);
}
while (blob != end_it->data ());
if (ymin < ymax) {
leftx = (inT16) floor (rightx - blobwidth);
if (leftx < box.left ())
leftx = box.left (); //clip to real box
bl = ICOORD (leftx, (inT16) floor (ymin));
tr = ICOORD ((inT16) ceil (rightx), (inT16) ceil (ymax));
if (blobindex == 0)
box = TBOX (bl, tr); //change box
else {
newblob = new BLOBNBOX;
//box is all it has
newblob->box = TBOX (bl, tr);
//stay on current
newblob->base_char_top_ = tr.y();
newblob->base_char_bottom_ = bl.y();
end_it->add_after_stay_put (newblob);
}
}
}
}
}
| void BLOBNBOX::CleanNeighbours | ( | ) |
Definition at line 200 of file blobbox.cpp.
| void BLOBNBOX::CleanNeighbours | ( | BLOBNBOX_LIST * | blobs | ) | [static] |
Definition at line 341 of file blobbox.cpp.
{
BLOBNBOX_IT blob_it(blobs);
for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
blob_it.data()->CleanNeighbours();
}
}
| void BLOBNBOX::ClearNeighbours | ( | ) | [inline] |
| void BLOBNBOX::compute_bounding_box | ( | ) | [inline] |
Definition at line 218 of file blobbox.h.
{
box = cblob_ptr->bounding_box();
base_char_top_ = box.top();
base_char_bottom_ = box.bottom();
}
| bool BLOBNBOX::ConfirmNoTabViolation | ( | const BLOBNBOX & | other | ) | const |
Definition at line 277 of file blobbox.cpp.
{
if (box.left() < other.box.left() && box.left() < other.left_rule_)
return false;
if (other.box.left() < box.left() && other.box.left() < left_rule_)
return false;
if (box.right() > other.box.right() && box.right() > other.right_rule_)
return false;
if (other.box.right() > box.right() && other.box.right() > right_rule_)
return false;
return true;
}
| void BLOBNBOX::ConstructionInit | ( | ) | [inline] |
| bool BLOBNBOX::DefiniteIndividualFlow | ( | ) |
Definition at line 238 of file blobbox.cpp.
{
int box_perimeter = 2 * (box.height() + box.width());
if (box.width() > box.height() * kDefiniteAspectRatio) {
// Attempt to distinguish a wide joined word from a dash.
// If it is a dash, then its perimeter is approximately
// 2 * (box width + stroke width), but more if the outline is noisy,
// so perimeter - 2*(box width + stroke width) should be close to zero.
// A complex shape such as a joined word should have a much larger value.
int perimeter = cblob()->perimeter();
if (vert_stroke_width() > 0)
perimeter -= 2 * vert_stroke_width();
else
perimeter -= 4 * cblob()->area() / perimeter;
perimeter -= 2 * box.width();
// Use a multiple of the box perimeter as a threshold.
if (perimeter > kComplexShapePerimeterRatio * box_perimeter) {
set_vert_possible(false);
set_horz_possible(true);
return true;
}
}
if (box.height() > box.width() * kDefiniteAspectRatio) {
// As above, but for a putative vertical word vs a I/1/l.
int perimeter = cblob()->perimeter();
if (horz_stroke_width() > 0)
perimeter -= 2 * horz_stroke_width();
else
perimeter -= 4 * cblob()->area() / perimeter;
perimeter -= 2 * box.height();
if (perimeter > kComplexShapePerimeterRatio * box_perimeter) {
set_vert_possible(true);
set_horz_possible(false);
return true;
}
}
return false;
}
| bool BLOBNBOX::DeletableNoise | ( | ) | const [inline] |
| void BLOBNBOX::DeleteNoiseBlobs | ( | BLOBNBOX_LIST * | blobs | ) | [static] |
Definition at line 349 of file blobbox.cpp.
{
BLOBNBOX_IT blob_it(blobs);
for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) {
BLOBNBOX* blob = blob_it.data();
if (blob->DeletableNoise()) {
delete blob->cblob();
delete blob_it.extract();
}
}
}
| inT32 BLOBNBOX::enclosed_area | ( | ) | const [inline] |
| BlobTextFlowType BLOBNBOX::flow | ( | ) | const [inline] |
| bool BLOBNBOX::good_stroke_neighbour | ( | BlobNeighbourDir | n | ) | const [inline] |
| int BLOBNBOX::GoodTextBlob | ( | ) | const |
Definition at line 212 of file blobbox.cpp.
{
int score = 0;
for (int dir = 0; dir < BND_COUNT; ++dir) {
BlobNeighbourDir bnd = static_cast<BlobNeighbourDir>(dir);
if (good_stroke_neighbour(bnd))
++score;
}
return score;
}
| bool BLOBNBOX::horz_possible | ( | ) | const [inline] |
| float BLOBNBOX::horz_stroke_width | ( | ) | const [inline] |
| bool BLOBNBOX::IsDiacritic | ( | ) | const [inline] |
| static bool BLOBNBOX::IsImageType | ( | BlobRegionType | type | ) | [inline, static] |
Definition at line 395 of file blobbox.h.
{
return type == BRT_RECTIMAGE || type == BRT_POLYIMAGE;
}
| static bool BLOBNBOX::IsLineType | ( | BlobRegionType | type | ) | [inline, static] |
| static bool BLOBNBOX::IsTextType | ( | BlobRegionType | type | ) | [inline, static] |
Definition at line 391 of file blobbox.h.
{
return type == BRT_TEXT || type == BRT_VERT_TEXT;
}
| bool BLOBNBOX::joined_to_prev | ( | ) | const [inline] |
| bool BLOBNBOX::leader_on_left | ( | ) | const [inline] |
| bool BLOBNBOX::leader_on_right | ( | ) | const [inline] |
| int BLOBNBOX::left_crossing_rule | ( | ) | const [inline] |
| int BLOBNBOX::left_rule | ( | ) | const [inline] |
| TabType BLOBNBOX::left_tab_type | ( | ) | const [inline] |
| int BLOBNBOX::line_crossings | ( | ) | const [inline] |
| bool BLOBNBOX::MatchingStrokeWidth | ( | const BLOBNBOX & | other, |
| double | fractional_tolerance, | ||
| double | constant_tolerance | ||
| ) | const |
Definition at line 290 of file blobbox.cpp.
{
// The perimeter-based width is used as a backup in case there is
// no information in the blob.
double p_width = area_stroke_width();
double n_p_width = other.area_stroke_width();
float h_tolerance = horz_stroke_width_ * fractional_tolerance
+ constant_tolerance;
float v_tolerance = vert_stroke_width_ * fractional_tolerance
+ constant_tolerance;
double p_tolerance = p_width * fractional_tolerance
+ constant_tolerance;
bool h_zero = horz_stroke_width_ == 0.0f || other.horz_stroke_width_ == 0.0f;
bool v_zero = vert_stroke_width_ == 0.0f || other.vert_stroke_width_ == 0.0f;
bool h_ok = !h_zero && NearlyEqual(horz_stroke_width_,
other.horz_stroke_width_, h_tolerance);
bool v_ok = !v_zero && NearlyEqual(vert_stroke_width_,
other.vert_stroke_width_, v_tolerance);
bool p_ok = h_zero && v_zero && NearlyEqual(p_width, n_p_width, p_tolerance);
// For a match, at least one of the horizontal and vertical widths
// must match, and the other one must either match or be zero.
// Only if both are zero will we look at the perimeter metric.
return p_ok || ((v_ok || h_ok) && (h_ok || h_zero) && (v_ok || v_zero));
}
| void BLOBNBOX::merge | ( | BLOBNBOX * | nextblob | ) |
Definition at line 78 of file blobbox.cpp.
{
box += nextblob->box; //merge boxes
set_diacritic_box(box);
nextblob->joined = TRUE;
}
| void BLOBNBOX::MinMaxGapsClipped | ( | int * | h_min, |
| int * | h_max, | ||
| int * | v_min, | ||
| int * | v_max | ||
| ) | const |
Definition at line 186 of file blobbox.cpp.
{
int max_dimension = MAX(box.width(), box.height());
int gaps[BND_COUNT];
NeighbourGaps(gaps);
*h_min = MIN(gaps[BND_LEFT], gaps[BND_RIGHT]);
*h_max = MAX(gaps[BND_LEFT], gaps[BND_RIGHT]);
if (*h_max > max_dimension && *h_min < max_dimension) *h_max = *h_min;
*v_min = MIN(gaps[BND_ABOVE], gaps[BND_BELOW]);
*v_max = MAX(gaps[BND_ABOVE], gaps[BND_BELOW]);
if (*v_max > max_dimension && *v_min < max_dimension) *v_max = *v_min;
}
| BLOBNBOX* BLOBNBOX::neighbour | ( | BlobNeighbourDir | n | ) | const [inline] |
| void BLOBNBOX::NeighbourGaps | ( | int | gaps[BND_COUNT] | ) | const |
Definition at line 167 of file blobbox.cpp.
| int BLOBNBOX::NoisyNeighbours | ( | ) | const |
Definition at line 223 of file blobbox.cpp.
{
int count = 0;
for (int dir = 0; dir < BND_COUNT; ++dir) {
BlobNeighbourDir bnd = static_cast<BlobNeighbourDir>(dir);
BLOBNBOX* blob = neighbour(bnd);
if (blob != NULL && blob->region_type() == BRT_NOISE)
++count;
}
return count;
}
| tesseract::ColPartition* BLOBNBOX::owner | ( | ) | const [inline] |
| void BLOBNBOX::plot | ( | ScrollView * | window, |
| ScrollView::Color | blob_colour, | ||
| ScrollView::Color | child_colour | ||
| ) | [inline] |
| void BLOBNBOX::PlotBlobs | ( | BLOBNBOX_LIST * | list, |
| ScrollView::Color | body_colour, | ||
| ScrollView::Color | child_colour, | ||
| ScrollView * | win | ||
| ) | [static] |
Definition at line 363 of file blobbox.cpp.
{
BLOBNBOX_IT it(list);
for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
it.data()->plot(win, body_colour, child_colour);
}
}
| void BLOBNBOX::PlotNoiseBlobs | ( | BLOBNBOX_LIST * | list, |
| ScrollView::Color | body_colour, | ||
| ScrollView::Color | child_colour, | ||
| ScrollView * | win | ||
| ) | [static] |
Definition at line 376 of file blobbox.cpp.
{
BLOBNBOX_IT it(list);
for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
BLOBNBOX* blob = it.data();
if (blob->DeletableNoise())
blob->plot(win, body_colour, child_colour);
}
}
| void BLOBNBOX::really_merge | ( | BLOBNBOX * | other | ) |
Definition at line 89 of file blobbox.cpp.
{
if (cblob_ptr != NULL && other->cblob_ptr != NULL) {
C_OUTLINE_IT ol_it(cblob_ptr->out_list());
ol_it.add_list_after(other->cblob_ptr->out_list());
}
compute_bounding_box();
}
| bool BLOBNBOX::red_box_set | ( | ) | const [inline] |
| const TBOX& BLOBNBOX::reduced_box | ( | ) | const [inline] |
| void BLOBNBOX::reflect_box_in_y_axis | ( | ) |
| BlobRegionType BLOBNBOX::region_type | ( | ) | const [inline] |
| void BLOBNBOX::ReInit | ( | ) | [inline] |
Definition at line 452 of file blobbox.h.
{
joined = false;
reduced = false;
repeated_set_ = 0;
left_tab_type_ = TT_NONE;
right_tab_type_ = TT_NONE;
region_type_ = BRT_UNKNOWN;
flow_ = BTFT_NONE;
spt_type_ = BSTT_SKIP;
left_rule_ = 0;
right_rule_ = 0;
left_crossing_rule_ = 0;
right_crossing_rule_ = 0;
if (area_stroke_width_ == 0.0f && area > 0 && cblob() != NULL)
area_stroke_width_ = 2.0f * area / cblob()->perimeter();
owner_ = NULL;
base_char_top_ = box.top();
base_char_bottom_ = box.bottom();
line_crossings_ = 0;
base_char_blob_ = NULL;
horz_possible_ = false;
vert_possible_ = false;
leader_on_left_ = false;
leader_on_right_ = false;
ClearNeighbours();
}
| int BLOBNBOX::repeated_set | ( | ) | const [inline] |
| int BLOBNBOX::right_crossing_rule | ( | ) | const [inline] |
| int BLOBNBOX::right_rule | ( | ) | const [inline] |
| TabType BLOBNBOX::right_tab_type | ( | ) | const [inline] |
| void BLOBNBOX::rotate | ( | FCOORD | rotation | ) |
Definition at line 41 of file blobbox.cpp.
{
cblob_ptr->rotate(rotation);
rotate_box(rotation);
compute_bounding_box();
}
| void BLOBNBOX::rotate_box | ( | FCOORD | rotation | ) |
Definition at line 57 of file blobbox.cpp.
{
if (IsDiacritic()) {
ASSERT_HOST(rotation.x() >= kCosSmallAngle)
ICOORD top_pt((box.left() + box.right()) / 2, base_char_top_);
ICOORD bottom_pt(top_pt.x(), base_char_bottom_);
top_pt.rotate(rotation);
base_char_top_ = top_pt.y();
bottom_pt.rotate(rotation);
base_char_bottom_ = bottom_pt.y();
box.rotate(rotation);
} else {
box.rotate(rotation);
set_diacritic_box(box);
}
}
| void BLOBNBOX::set_base_char_blob | ( | BLOBNBOX * | blob | ) | [inline] |
| void BLOBNBOX::set_bounding_box | ( | const TBOX & | new_box | ) | [inline] |
| void BLOBNBOX::set_diacritic_box | ( | const TBOX & | diacritic_box | ) | [inline] |
| void BLOBNBOX::set_flow | ( | BlobTextFlowType | value | ) | [inline] |
| void BLOBNBOX::set_horz_possible | ( | bool | value | ) | [inline] |
| void BLOBNBOX::set_horz_stroke_width | ( | float | width | ) | [inline] |
| void BLOBNBOX::set_leader_on_left | ( | bool | flag | ) | [inline] |
| void BLOBNBOX::set_leader_on_right | ( | bool | flag | ) | [inline] |
| void BLOBNBOX::set_left_crossing_rule | ( | int | new_left | ) | [inline] |
| void BLOBNBOX::set_left_rule | ( | int | new_left | ) | [inline] |
| void BLOBNBOX::set_left_tab_type | ( | TabType | new_type | ) | [inline] |
| void BLOBNBOX::set_line_crossings | ( | int | value | ) | [inline] |
| void BLOBNBOX::set_neighbour | ( | BlobNeighbourDir | n, |
| BLOBNBOX * | neighbour, | ||
| bool | good | ||
| ) | [inline] |
| void BLOBNBOX::set_owner | ( | tesseract::ColPartition * | new_owner | ) | [inline] |
| void BLOBNBOX::set_reduced_box | ( | TBOX | new_box | ) | [inline] |
| void BLOBNBOX::set_region_type | ( | BlobRegionType | new_type | ) | [inline] |
| void BLOBNBOX::set_repeated_set | ( | int | set_id | ) | [inline] |
| void BLOBNBOX::set_right_crossing_rule | ( | int | new_right | ) | [inline] |
| void BLOBNBOX::set_right_rule | ( | int | new_right | ) | [inline] |
| void BLOBNBOX::set_right_tab_type | ( | TabType | new_type | ) | [inline] |
| void BLOBNBOX::set_special_text_type | ( | BlobSpecialTextType | new_type | ) | [inline] |
| void BLOBNBOX::set_vert_possible | ( | bool | value | ) | [inline] |
| void BLOBNBOX::set_vert_stroke_width | ( | float | width | ) | [inline] |
| BlobSpecialTextType BLOBNBOX::special_text_type | ( | ) | const [inline] |
| ScrollView::Color BLOBNBOX::TextlineColor | ( | BlobRegionType | region_type, |
| BlobTextFlowType | flow_type | ||
| ) | [static] |
Definition at line 388 of file blobbox.cpp.
{
switch (region_type) {
case BRT_HLINE:
return ScrollView::BROWN;
case BRT_VLINE:
return ScrollView::DARK_GREEN;
case BRT_RECTIMAGE:
return ScrollView::RED;
case BRT_POLYIMAGE:
return ScrollView::ORANGE;
case BRT_UNKNOWN:
return flow_type == BTFT_NONTEXT ? ScrollView::CYAN : ScrollView::WHITE;
case BRT_VERT_TEXT:
if (flow_type == BTFT_STRONG_CHAIN || flow_type == BTFT_TEXT_ON_IMAGE)
return ScrollView::GREEN;
if (flow_type == BTFT_CHAIN)
return ScrollView::LIME_GREEN;
return ScrollView::YELLOW;
case BRT_TEXT:
if (flow_type == BTFT_STRONG_CHAIN)
return ScrollView::BLUE;
if (flow_type == BTFT_TEXT_ON_IMAGE)
return ScrollView::LIGHT_BLUE;
if (flow_type == BTFT_CHAIN)
return ScrollView::MEDIUM_BLUE;
if (flow_type == BTFT_LEADER)
return ScrollView::WHEAT;
if (flow_type == BTFT_NONTEXT)
return ScrollView::PINK;
return ScrollView::MAGENTA;
default:
return ScrollView::GREY;
}
}
| void BLOBNBOX::translate_box | ( | ICOORD | v | ) | [inline] |
Definition at line 156 of file blobbox.h.
{
if (IsDiacritic()) {
box.move(v);
base_char_top_ += v.y();
base_char_bottom_ += v.y();
} else {
box.move(v);
set_diacritic_box(box);
}
}
| bool BLOBNBOX::UniquelyHorizontal | ( | ) | const [inline] |
| bool BLOBNBOX::UniquelyVertical | ( | ) | const [inline] |
| static bool BLOBNBOX::UnMergeableType | ( | BlobRegionType | type | ) | [inline, static] |
Definition at line 403 of file blobbox.h.
{
return IsLineType(type) || IsImageType(type);
}
| bool BLOBNBOX::vert_possible | ( | ) | const [inline] |
| float BLOBNBOX::vert_stroke_width | ( | ) | const [inline] |