mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 14:41:36 +08:00
Fixed issue 1116
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1074 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
e6e6c35ee1
commit
45e106820f
@ -1878,8 +1878,10 @@ bool TessBaseAPI::GetTextDirection(int* out_offset, float* out_slope) {
|
||||
// Get the y-coord of the baseline at the left and right edges of the
|
||||
// textline's bounding box.
|
||||
int left, top, right, bottom;
|
||||
if (!it->BoundingBox(RIL_TEXTLINE, &left, &top, &right, &bottom))
|
||||
if (!it->BoundingBox(RIL_TEXTLINE, &left, &top, &right, &bottom)) {
|
||||
delete it;
|
||||
return false;
|
||||
}
|
||||
int left_y = IntCastRounded(*out_slope * left + *out_offset);
|
||||
int right_y = IntCastRounded(*out_slope * right + *out_offset);
|
||||
// Shift the baseline down so it passes through the nearest bottom-corner
|
||||
|
Loading…
Reference in New Issue
Block a user