tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
TBOX Class Reference

#include <rect.h>

Collaboration diagram for TBOX:

Public Member Functions

 TBOX ()
 
 TBOX (const ICOORD pt1, const ICOORD pt2)
 
 TBOX (int16_t left, int16_t bottom, int16_t right, int16_t top)
 
 TBOX (const FCOORD pt)
 
bool null_box () const
 
bool operator== (const TBOX &other) const
 
int16_t top () const
 
void set_top (int y)
 
int16_t bottom () const
 
void set_bottom (int y)
 
int16_t left () const
 
void set_left (int x)
 
int16_t right () const
 
void set_right (int x)
 
int x_middle () const
 
int y_middle () const
 
const ICOORDbotleft () const
 
ICOORD botright () const
 
ICOORD topleft () const
 
const ICOORDtopright () const
 
int16_t height () const
 
int16_t width () const
 
int32_t area () const
 
void pad (int xpad, int ypad)
 
void move_bottom_edge (const int16_t y)
 
void move_left_edge (const int16_t x)
 
void move_right_edge (const int16_t x)
 
void move_top_edge (const int16_t y)
 
void move (const ICOORD vec)
 
void move (const FCOORD vec)
 
void scale (const float f)
 
void scale (const FCOORD vec)
 
void rotate (const FCOORD &vec)
 
void rotate_large (const FCOORD &vec)
 
bool contains (const FCOORD pt) const
 
bool contains (const TBOX &box) const
 
bool overlap (const TBOX &box) const
 
bool major_overlap (const TBOX &box) const
 
bool x_overlap (const TBOX &box) const
 
int x_gap (const TBOX &box) const
 
int y_gap (const TBOX &box) const
 
bool major_x_overlap (const TBOX &box) const
 
bool y_overlap (const TBOX &box) const
 
bool major_y_overlap (const TBOX &box) const
 
double overlap_fraction (const TBOX &box) const
 
double x_overlap_fraction (const TBOX &box) const
 
double y_overlap_fraction (const TBOX &box) const
 
bool x_almost_equal (const TBOX &box, int tolerance) const
 
bool almost_equal (const TBOX &box, int tolerance) const
 
TBOX intersection (const TBOX &box) const
 
TBOX bounding_union (const TBOX &box) const
 
void set_to_given_coords (int x_min, int y_min, int x_max, int y_max)
 
void print () const
 
void print_to_str (STRING *str) const
 
void plot (ScrollView *fd) const
 
void plot (ScrollView *fd, ScrollView::Color fill_colour, ScrollView::Color border_colour) const
 
bool Serialize (FILE *fp) const
 
bool DeSerialize (bool swap, FILE *fp)
 

Private Attributes

ICOORD bot_left
 
ICOORD top_right
 

Friends

TBOXoperator+= (TBOX &, const TBOX &)
 
TBOXoperator &= (TBOX &, const TBOX &)
 

Constructor & Destructor Documentation

◆ TBOX() [1/4]

TBOX::TBOX ( )
inline

◆ TBOX() [2/4]

TBOX::TBOX ( const ICOORD  pt1,
const ICOORD  pt2 
)

◆ TBOX() [3/4]

TBOX::TBOX ( int16_t  left,
int16_t  bottom,
int16_t  right,
int16_t  top 
)

◆ TBOX() [4/4]

TBOX::TBOX ( const FCOORD  pt)
inline

Member Function Documentation

◆ almost_equal()

bool TBOX::almost_equal ( const TBOX box,
int  tolerance 
) const

◆ area()

int32_t TBOX::area ( ) const
inline

◆ botleft()

const ICOORD& TBOX::botleft ( ) const
inline

◆ botright()

ICOORD TBOX::botright ( ) const
inline

◆ bottom()

int16_t TBOX::bottom ( ) const
inline

◆ bounding_union()

TBOX TBOX::bounding_union ( const TBOX box) const

◆ contains() [1/2]

bool TBOX::contains ( const FCOORD  pt) const
inline

◆ contains() [2/2]

bool TBOX::contains ( const TBOX box) const
inline

◆ DeSerialize()

bool TBOX::DeSerialize ( bool  swap,
FILE *  fp 
)

◆ height()

int16_t TBOX::height ( ) const
inline

◆ intersection()

TBOX TBOX::intersection ( const TBOX box) const

◆ left()

int16_t TBOX::left ( ) const
inline

◆ major_overlap()

bool TBOX::major_overlap ( const TBOX box) const
inline

◆ major_x_overlap()

bool TBOX::major_x_overlap ( const TBOX box) const
inline

◆ major_y_overlap()

bool TBOX::major_y_overlap ( const TBOX box) const
inline

◆ move() [1/2]

void TBOX::move ( const ICOORD  vec)
inline

◆ move() [2/2]

void TBOX::move ( const FCOORD  vec)
inline

◆ move_bottom_edge()

void TBOX::move_bottom_edge ( const int16_t  y)
inline

◆ move_left_edge()

void TBOX::move_left_edge ( const int16_t  x)
inline

◆ move_right_edge()

void TBOX::move_right_edge ( const int16_t  x)
inline

◆ move_top_edge()

void TBOX::move_top_edge ( const int16_t  y)
inline

◆ null_box()

bool TBOX::null_box ( ) const
inline

◆ operator==()

bool TBOX::operator== ( const TBOX other) const
inline

◆ overlap()

bool TBOX::overlap ( const TBOX box) const
inline

◆ overlap_fraction()

double TBOX::overlap_fraction ( const TBOX box) const
inline

◆ pad()

void TBOX::pad ( int  xpad,
int  ypad 
)
inline

◆ plot() [1/2]

void TBOX::plot ( ScrollView fd) const
inline

◆ plot() [2/2]

void TBOX::plot ( ScrollView fd,
ScrollView::Color  fill_colour,
ScrollView::Color  border_colour 
) const

◆ print()

void TBOX::print ( ) const
inline

◆ print_to_str()

void TBOX::print_to_str ( STRING str) const

◆ right()

int16_t TBOX::right ( ) const
inline

◆ rotate()

void TBOX::rotate ( const FCOORD vec)
inline

◆ rotate_large()

void TBOX::rotate_large ( const FCOORD vec)

◆ scale() [1/2]

void TBOX::scale ( const float  f)
inline

◆ scale() [2/2]

void TBOX::scale ( const FCOORD  vec)
inline

◆ Serialize()

bool TBOX::Serialize ( FILE *  fp) const

◆ set_bottom()

void TBOX::set_bottom ( int  y)
inline

◆ set_left()

void TBOX::set_left ( int  x)
inline

◆ set_right()

void TBOX::set_right ( int  x)
inline

◆ set_to_given_coords()

void TBOX::set_to_given_coords ( int  x_min,
int  y_min,
int  x_max,
int  y_max 
)
inline

◆ set_top()

void TBOX::set_top ( int  y)
inline

◆ top()

int16_t TBOX::top ( ) const
inline

◆ topleft()

ICOORD TBOX::topleft ( ) const
inline

◆ topright()

const ICOORD& TBOX::topright ( ) const
inline

◆ width()

int16_t TBOX::width ( ) const
inline

◆ x_almost_equal()

bool TBOX::x_almost_equal ( const TBOX box,
int  tolerance 
) const

◆ x_gap()

int TBOX::x_gap ( const TBOX box) const
inline

◆ x_middle()

int TBOX::x_middle ( ) const
inline

◆ x_overlap()

bool TBOX::x_overlap ( const TBOX box) const
inline

◆ x_overlap_fraction()

double TBOX::x_overlap_fraction ( const TBOX box) const
inline

◆ y_gap()

int TBOX::y_gap ( const TBOX box) const
inline

◆ y_middle()

int TBOX::y_middle ( ) const
inline

◆ y_overlap()

bool TBOX::y_overlap ( const TBOX box) const
inline

◆ y_overlap_fraction()

double TBOX::y_overlap_fraction ( const TBOX box) const
inline

Friends And Related Function Documentation

◆ operator &=

TBOX& operator&= ( TBOX op1,
const TBOX op2 
)
friend

◆ operator+=

TBOX& operator+= ( TBOX op1,
const TBOX op2 
)
friend

Member Data Documentation

◆ bot_left

ICOORD TBOX::bot_left
private

◆ top_right

ICOORD TBOX::top_right
private

The documentation for this class was generated from the following files: