src/ccstruct/pdblock.cpp
bool PDBLK::contains( // test containment
    ICOORD pt         // point to test
) {
  BLOCK_RECT_IT it = this; // rectangle iterator
  ICOORD bleft, tright;    // corners of rectangle

  for (it.start_block(); !it.cycled_rects(); it.forward()) {
    // get rectangle
    it.bounding_box(bleft, tright);
    // inside rect
    if (pt.x() >= bleft.x() && pt.x() <= tright.x() && pt.y() >= bleft.y() &&
        pt.y() <= tright.y()) {
      return true; // is inside
    }
  }
  return false; // not inside
}
/**********************************************************************
 * PDBLK::contains
 *
 * Return true if the given point is within the block.
 **********************************************************************/
:contains
Return true if the given point is within the block.
: contains Return true if the given point is within the block .
bool PDBLK::contains( 
    ICOORD pt         
) {
  BLOCK_RECT_IT it = this; 
  ICOORD bleft, tright;    
  for (it.start_block(); !it.cycled_rects(); it.forward()) {
    it.bounding_box(bleft, tright);
    if (pt.x() >= bleft.x() && pt.x() <= tright.x() && pt.y() >= bleft.y() &&
        pt.y() <= tright.y()) {
      return true; 
    }
  }
  return false; 
}
bool PDBLK :: contains ( ICOORD pt ) { BLOCK_RECT_IT it = this ; ICOORD bleft , tright ; for ( it . start_block ( ) ; ! it . cycled_rects ( ) ; it . forward ( ) ) { it . bounding_box ( bleft , tright ) ; if ( pt . x ( ) >= bleft . x ( ) && pt . x ( ) <= tright . x ( ) && pt . y ( ) >= bleft . y ( ) && pt . y ( ) <= tright . y ( ) ) { return true ; } } return false ; }
PDBLK::contains
 Return true if the given point is within the block.
PDBLK :: contains Return true if the given point is within the block .
// test containment // point to test // rectangle iterator // corners of rectangle // get rectangle // inside rect // is inside // not inside