2007-03-08 04:03:40 +08:00
|
|
|
/**********************************************************************
|
|
|
|
* File: pdblock.h (Formerly pdblk.h)
|
|
|
|
* Description: Page block class definition.
|
2010-11-24 02:34:14 +08:00
|
|
|
* Author: Ray Smith
|
|
|
|
* Created: Thu Mar 14 17:32:01 GMT 1991
|
2007-03-08 04:03:40 +08:00
|
|
|
*
|
|
|
|
* (C) Copyright 1991, Hewlett-Packard Ltd.
|
|
|
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
** you may not use this file except in compliance with the License.
|
|
|
|
** You may obtain a copy of the License at
|
|
|
|
** http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
** Unless required by applicable law or agreed to in writing, software
|
|
|
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
** See the License for the specific language governing permissions and
|
|
|
|
** limitations under the License.
|
|
|
|
*
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef PDBLOCK_H
|
|
|
|
#define PDBLOCK_H
|
|
|
|
|
2010-11-24 02:34:14 +08:00
|
|
|
#include "clst.h"
|
2007-03-08 04:03:40 +08:00
|
|
|
#include "strngs.h"
|
2009-07-11 10:14:57 +08:00
|
|
|
#include "polyblk.h"
|
2007-03-08 04:03:40 +08:00
|
|
|
|
|
|
|
class DLLSYM PDBLK; //forward decl
|
2010-11-24 02:34:14 +08:00
|
|
|
struct Pix;
|
2007-03-08 04:03:40 +08:00
|
|
|
|
|
|
|
CLISTIZEH (PDBLK)
|
2010-07-28 08:38:09 +08:00
|
|
|
///page block
|
2016-11-08 02:46:33 +08:00
|
|
|
class PDBLK {
|
2010-07-28 08:38:09 +08:00
|
|
|
friend class BLOCK_RECT_IT; //< block iterator
|
2018-04-19 19:55:39 +08:00
|
|
|
friend class BLOCK; //< Page Block
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2016-11-08 02:46:33 +08:00
|
|
|
public:
|
|
|
|
/// empty constructor
|
|
|
|
PDBLK() {
|
2016-12-13 00:20:05 +08:00
|
|
|
hand_poly = nullptr;
|
2016-11-08 02:46:33 +08:00
|
|
|
index_ = 0;
|
|
|
|
}
|
|
|
|
/// simple constructor
|
Use POSIX data types and macros (#878)
* api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* cutil: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* training: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract data types by POSIX data types
Now all Tesseract data types which are no longer needed can be removed
from ccutil/host.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* lstm: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Remove the macros which are now unused from ccutil/host.h.
Remove also the obsolete history comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix build error caused by ambiguous ClipToRange
Error message vom Appveyor CI:
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2672: 'ClipToRange': no matching overloaded function found [C:\projects\tesseract\build\libtesseract.vcxproj]
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2782: 'T ClipToRange(const T &,const T &,const T &)': template parameter 'T' is ambiguous [C:\projects\tesseract\build\libtesseract.vcxproj]
c:\projects\tesseract\ccutil\helpers.h(122): note: see declaration of 'ClipToRange'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: could be 'char'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: or 'int'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* unittest: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* arch: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-14 04:36:30 +08:00
|
|
|
PDBLK(int16_t xmin, //< bottom left
|
|
|
|
int16_t ymin,
|
|
|
|
int16_t xmax, //< top right
|
|
|
|
int16_t ymax);
|
2016-11-08 02:46:33 +08:00
|
|
|
|
|
|
|
/// set vertex lists
|
|
|
|
///@param left list of left vertices
|
|
|
|
///@param right list of right vertices
|
|
|
|
void set_sides(ICOORDELT_LIST *left, ICOORDELT_LIST *right);
|
|
|
|
|
|
|
|
/// destructor
|
2016-12-01 07:44:25 +08:00
|
|
|
~PDBLK() { delete hand_poly; }
|
2016-11-08 02:46:33 +08:00
|
|
|
|
|
|
|
POLY_BLOCK *poly_block() const { return hand_poly; }
|
|
|
|
/// set the poly block
|
|
|
|
void set_poly_block(POLY_BLOCK *blk) { hand_poly = blk; }
|
|
|
|
/// get box
|
|
|
|
void bounding_box(ICOORD &bottom_left, // bottom left
|
|
|
|
ICOORD &top_right) const { // topright
|
|
|
|
bottom_left = box.botleft();
|
|
|
|
top_right = box.topright();
|
|
|
|
}
|
|
|
|
/// get real box
|
|
|
|
const TBOX &bounding_box() const { return box; }
|
|
|
|
|
|
|
|
int index() const { return index_; }
|
|
|
|
void set_index(int value) { index_ = value; }
|
|
|
|
|
|
|
|
/// is pt inside block
|
|
|
|
BOOL8 contains(ICOORD pt);
|
|
|
|
|
|
|
|
/// reposition block
|
|
|
|
void move(const ICOORD vec); // by vector
|
|
|
|
|
|
|
|
// Returns a binary Pix mask with a 1 pixel for every pixel within the
|
|
|
|
// block. Rotates the coordinate system by rerotation prior to rendering.
|
2016-12-13 00:20:05 +08:00
|
|
|
// If not nullptr, mask_box is filled with the position box of the returned
|
2016-11-08 02:46:33 +08:00
|
|
|
// mask image.
|
|
|
|
Pix *render_mask(const FCOORD &rerotation, TBOX *mask_box);
|
|
|
|
|
|
|
|
#ifndef GRAPHICS_DISABLED
|
|
|
|
/// draw histogram
|
|
|
|
///@param window window to draw in
|
|
|
|
///@param serial serial number
|
|
|
|
///@param colour colour to draw in
|
Use POSIX data types and macros (#878)
* api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* cutil: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* training: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract data types by POSIX data types
Now all Tesseract data types which are no longer needed can be removed
from ccutil/host.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* lstm: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Remove the macros which are now unused from ccutil/host.h.
Remove also the obsolete history comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix build error caused by ambiguous ClipToRange
Error message vom Appveyor CI:
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2672: 'ClipToRange': no matching overloaded function found [C:\projects\tesseract\build\libtesseract.vcxproj]
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2782: 'T ClipToRange(const T &,const T &,const T &)': template parameter 'T' is ambiguous [C:\projects\tesseract\build\libtesseract.vcxproj]
c:\projects\tesseract\ccutil\helpers.h(122): note: see declaration of 'ClipToRange'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: could be 'char'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: or 'int'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* unittest: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* arch: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-14 04:36:30 +08:00
|
|
|
void plot(ScrollView *window, int32_t serial, ScrollView::Color colour);
|
2016-11-08 02:46:33 +08:00
|
|
|
#endif // GRAPHICS_DISABLED
|
|
|
|
|
|
|
|
/// assignment
|
|
|
|
///@param source from this
|
|
|
|
PDBLK &operator=(const PDBLK &source);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
POLY_BLOCK *hand_poly; //< weird as well
|
|
|
|
ICOORDELT_LIST leftside; //< left side vertices
|
|
|
|
ICOORDELT_LIST rightside; //< right side vertices
|
|
|
|
TBOX box; //< bounding box
|
|
|
|
int index_; //< Serial number of this block.
|
2007-03-08 04:03:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class DLLSYM BLOCK_RECT_IT //rectangle iterator
|
|
|
|
{
|
|
|
|
public:
|
2010-07-28 08:38:09 +08:00
|
|
|
///constructor
|
|
|
|
///@param blkptr block to iterate
|
|
|
|
BLOCK_RECT_IT(PDBLK *blkptr);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2010-07-28 08:38:09 +08:00
|
|
|
///start (new) block
|
2010-11-24 02:34:14 +08:00
|
|
|
void set_to_block (
|
2007-03-08 04:03:40 +08:00
|
|
|
PDBLK * blkptr); //block to iterate
|
|
|
|
|
2010-11-24 02:34:14 +08:00
|
|
|
///start iteration
|
2010-07-28 08:38:09 +08:00
|
|
|
void start_block();
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2010-11-24 02:34:14 +08:00
|
|
|
///next rectangle
|
2010-07-28 08:38:09 +08:00
|
|
|
void forward();
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2010-11-24 02:34:14 +08:00
|
|
|
///test end
|
2010-07-28 08:38:09 +08:00
|
|
|
BOOL8 cycled_rects() {
|
2007-03-08 04:03:40 +08:00
|
|
|
return left_it.cycled_list () && right_it.cycled_list ();
|
|
|
|
}
|
|
|
|
|
2010-11-24 02:34:14 +08:00
|
|
|
///current rectangle
|
|
|
|
///@param bleft bottom left
|
|
|
|
///@param tright top right
|
2010-07-28 08:38:09 +08:00
|
|
|
void bounding_box(ICOORD &bleft,
|
|
|
|
ICOORD &tright) {
|
2007-03-08 04:03:40 +08:00
|
|
|
//bottom left
|
|
|
|
bleft = ICOORD (left_it.data ()->x (), ymin);
|
|
|
|
//top right
|
|
|
|
tright = ICOORD (right_it.data ()->x (), ymax);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
Use POSIX data types and macros (#878)
* api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* cutil: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* training: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract data types by POSIX data types
Now all Tesseract data types which are no longer needed can be removed
from ccutil/host.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* lstm: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Remove the macros which are now unused from ccutil/host.h.
Remove also the obsolete history comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix build error caused by ambiguous ClipToRange
Error message vom Appveyor CI:
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2672: 'ClipToRange': no matching overloaded function found [C:\projects\tesseract\build\libtesseract.vcxproj]
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2782: 'T ClipToRange(const T &,const T &,const T &)': template parameter 'T' is ambiguous [C:\projects\tesseract\build\libtesseract.vcxproj]
c:\projects\tesseract\ccutil\helpers.h(122): note: see declaration of 'ClipToRange'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: could be 'char'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: or 'int'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* unittest: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* arch: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-14 04:36:30 +08:00
|
|
|
int16_t ymin; //< bottom of rectangle
|
|
|
|
int16_t ymax; //< top of rectangle
|
2010-07-28 08:38:09 +08:00
|
|
|
PDBLK *block; //< block to iterate
|
|
|
|
ICOORDELT_IT left_it; //< boundary iterators
|
2007-03-08 04:03:40 +08:00
|
|
|
ICOORDELT_IT right_it;
|
|
|
|
};
|
|
|
|
|
2010-07-28 08:38:09 +08:00
|
|
|
///rectangle iterator
|
|
|
|
class DLLSYM BLOCK_LINE_IT
|
2007-03-08 04:03:40 +08:00
|
|
|
{
|
|
|
|
public:
|
2010-07-28 08:38:09 +08:00
|
|
|
///constructor
|
|
|
|
///@param blkptr from block
|
|
|
|
BLOCK_LINE_IT (PDBLK * blkptr)
|
2007-03-08 04:03:40 +08:00
|
|
|
:rect_it (blkptr) {
|
|
|
|
block = blkptr; //remember block
|
|
|
|
}
|
|
|
|
|
2010-07-28 08:38:09 +08:00
|
|
|
///start (new) block
|
2010-11-24 02:34:14 +08:00
|
|
|
///@param blkptr block to start
|
|
|
|
void set_to_block (PDBLK * blkptr) {
|
2007-03-08 04:03:40 +08:00
|
|
|
block = blkptr; //remember block
|
|
|
|
//set iterator
|
|
|
|
rect_it.set_to_block (blkptr);
|
|
|
|
}
|
|
|
|
|
2010-11-24 02:34:14 +08:00
|
|
|
///get a line
|
|
|
|
///@param y line to get
|
|
|
|
///@param xext output extent
|
Use POSIX data types and macros (#878)
* api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* cutil: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* training: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract data types by POSIX data types
Now all Tesseract data types which are no longer needed can be removed
from ccutil/host.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccmain: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccstruct: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* classify: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* dict: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* lstm: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* textord: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* wordrec: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* ccutil: Replace Tesseract's MIN_*INT, MAX_*INT* by POSIX *INT*_MIN, *INT*_MAX
Remove the macros which are now unused from ccutil/host.h.
Remove also the obsolete history comments.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Fix build error caused by ambiguous ClipToRange
Error message vom Appveyor CI:
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2672: 'ClipToRange': no matching overloaded function found [C:\projects\tesseract\build\libtesseract.vcxproj]
C:\projects\tesseract\ccstruct\coutln.cpp(818): error C2782: 'T ClipToRange(const T &,const T &,const T &)': template parameter 'T' is ambiguous [C:\projects\tesseract\build\libtesseract.vcxproj]
c:\projects\tesseract\ccutil\helpers.h(122): note: see declaration of 'ClipToRange'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: could be 'char'
C:\projects\tesseract\ccstruct\coutln.cpp(818): note: or 'int'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* unittest: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* arch: Replace Tesseract's MAX_INT8 by POSIX INT8_MAX
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-14 04:36:30 +08:00
|
|
|
int16_t get_line(int16_t y,
|
|
|
|
int16_t &xext);
|
2007-03-08 04:03:40 +08:00
|
|
|
|
|
|
|
private:
|
2010-07-28 08:38:09 +08:00
|
|
|
PDBLK * block; //< block to iterate
|
|
|
|
BLOCK_RECT_IT rect_it; //< rectangle iterator
|
2007-03-08 04:03:40 +08:00
|
|
|
};
|
|
|
|
|
2010-07-28 08:38:09 +08:00
|
|
|
int decreasing_top_order(const void *row1,
|
2007-03-08 04:03:40 +08:00
|
|
|
const void *row2);
|
|
|
|
#endif
|