#include "clst.h"
#include "normalis.h"
#include "publictypes.h"
#include "rect.h"
#include "vecfuncs.h"
Go to the source code of this file.
◆ EDGEPTFLAGS
#define EDGEPTFLAGS 4 /*concavity,length etc. */ |
◆ VECTOR
◆ CLISTIZEH()
◆ divide_blobs()
void divide_blobs |
( |
TBLOB * |
blob, |
|
|
TBLOB * |
other_blob, |
|
|
bool |
italic_blob, |
|
|
const TPOINT & |
location |
|
) |
| |
Definition at line 983 of file blobs.cpp.
992 int location_prod =
CROSS(location, vertical);
994 while (outline != NULL) {
998 int mid_prod =
CROSS(mid_pt, vertical);
999 if (mid_prod < location_prod) {
1002 outline1->
next = outline;
1009 outline2->
next = outline;
1014 outline = outline->
next;
1018 outline1->
next = NULL;
1020 outline2->
next = NULL;
const TPOINT kDivisibleVerticalItalic(1, 5)
const TPOINT kDivisibleVerticalUpright(0, 1)
◆ divisible_blob()
bool divisible_blob |
( |
TBLOB * |
blob, |
|
|
bool |
italic_blob, |
|
|
TPOINT * |
location |
|
) |
| |
Definition at line 934 of file blobs.cpp.
941 outline1 = outline1->
next) {
942 if (outline1->is_hole)
945 static_cast<inT16>((outline1->topleft.x + outline1->botright.x) / 2),
946 static_cast<inT16>((outline1->topleft.y + outline1->botright.y) / 2));
947 int mid_prod1 =
CROSS(mid_pt1, vertical);
948 int min_prod1, max_prod1;
949 outline1->MinMaxCrossProduct(vertical, &min_prod1, &max_prod1);
950 for (
TESSLINE* outline2 = outline1->
next; outline2 != NULL;
951 outline2 = outline2->
next) {
952 if (outline2->is_hole)
955 static_cast<inT16>((outline2->topleft.x + outline2->botright.x) / 2),
956 static_cast<inT16>((outline2->topleft.y + outline2->botright.y) / 2));
957 int mid_prod2 =
CROSS(mid_pt2, vertical);
958 int min_prod2, max_prod2;
959 outline2->MinMaxCrossProduct(vertical, &min_prod2, &max_prod2);
960 int mid_gap = abs(mid_prod2 - mid_prod1);
961 int overlap =
MIN(max_prod1, max_prod2) -
MAX(min_prod1, min_prod2);
962 if (mid_gap - overlap / 4 > max_gap) {
963 max_gap = mid_gap - overlap / 4;
965 *location += mid_pt2;
972 return max_gap > vertical.
y;
const TPOINT kDivisibleVerticalItalic(1, 5)
const TPOINT kDivisibleVerticalUpright(0, 1)