Tesseract
3.02
|
Go to the source code of this file.
Functions | |
DLLSYM TBOX & | operator+= (TBOX &op1, const TBOX &op2) |
TBOX & | operator&= (TBOX &op1, const TBOX &op2) |
Definition at line 221 of file rect.cpp.
{ if (op1.overlap (op2)) { if (op2.bot_left.x () > op1.bot_left.x ()) op1.bot_left.set_x (op2.bot_left.x ()); if (op2.top_right.x () < op1.top_right.x ()) op1.top_right.set_x (op2.top_right.x ()); if (op2.bot_left.y () > op1.bot_left.y ()) op1.bot_left.set_y (op2.bot_left.y ()); if (op2.top_right.y () < op1.top_right.y ()) op1.top_right.set_y (op2.top_right.y ()); } else { op1.bot_left.set_x (MAX_INT16); op1.bot_left.set_y (MAX_INT16); op1.top_right.set_x (-MAX_INT16); op1.top_right.set_y (-MAX_INT16); } return op1; }
Definition at line 196 of file rect.cpp.
{ if (op2.bot_left.x () < op1.bot_left.x ()) op1.bot_left.set_x (op2.bot_left.x ()); if (op2.top_right.x () > op1.top_right.x ()) op1.top_right.set_x (op2.top_right.x ()); if (op2.bot_left.y () < op1.bot_left.y ()) op1.bot_left.set_y (op2.bot_left.y ()); if (op2.top_right.y () > op1.top_right.y ()) op1.top_right.set_y (op2.top_right.y ()); return op1; }