src/ccstruct/pdblock.cpp
TDimension BLOCK_LINE_IT::get_line( // get a line
    TDimension y,                   // line to get
    TDimension &xext                // output extent
) {
  ICOORD bleft;  // bounding box
  ICOORD tright; // of block & rect

  // get block box
  block->bounding_box(bleft, tright);
  if (y < bleft.y() || y >= tright.y()) {
    //              block->print(stderr,false);
    BADBLOCKLINE.error("BLOCK_LINE_IT::get_line", ABORT, "Y=%d", y);
  }

  // get rectangle box
  rect_it.bounding_box(bleft, tright);
  // inside rectangle
  if (y >= bleft.y() && y < tright.y()) {
    // width of line
    xext = tright.x() - bleft.x();
    return bleft.x(); // start of line
  }
  for (rect_it.start_block(); !rect_it.cycled_rects(); rect_it.forward()) {
    // get rectangle box
    rect_it.bounding_box(bleft, tright);
    // inside rectangle
    if (y >= bleft.y() && y < tright.y()) {
      // width of line
      xext = tright.x() - bleft.x();
      return bleft.x(); // start of line
    }
  }
  LOSTBLOCKLINE.error("BLOCK_LINE_IT::get_line", ABORT, "Y=%d", y);
  return 0; // dummy to stop warning
}
/**********************************************************************
 * BLOCK_LINE_IT::get_line
 *
 * Get the the start and width of a line in the block.
 **********************************************************************/
:get_line
Get the the start and width of a line in the block.
: get_line Get the the start and width of a line in the block .
TDimension BLOCK_LINE_IT::get_line( 
    TDimension y,                   
    TDimension &xext                
) {
  ICOORD bleft;  
  ICOORD tright; 
  block->bounding_box(bleft, tright);
  if (y < bleft.y() || y >= tright.y()) {
    BADBLOCKLINE.error("BLOCK_LINE_IT::get_line", ABORT, "Y=%d", y);
  }
  rect_it.bounding_box(bleft, tright);
  if (y >= bleft.y() && y < tright.y()) {
    xext = tright.x() - bleft.x();
    return bleft.x(); 
  }
  for (rect_it.start_block(); !rect_it.cycled_rects(); rect_it.forward()) {
    rect_it.bounding_box(bleft, tright);
    if (y >= bleft.y() && y < tright.y()) {
      xext = tright.x() - bleft.x();
      return bleft.x(); 
    }
  }
  LOSTBLOCKLINE.error("BLOCK_LINE_IT::get_line", ABORT, "Y=%d", y);
  return 0; 
}
TDimension BLOCK_LINE_IT :: get_line ( TDimension y , TDimension & xext ) { ICOORD bleft ; ICOORD tright ; block -> bounding_box ( bleft , tright ) ; if ( y < bleft . y ( ) || y >= tright . y ( ) ) { BADBLOCKLINE . error ( " " , ABORT , " " , y ) ; } rect_it . bounding_box ( bleft , tright ) ; if ( y >= bleft . y ( ) && y < tright . y ( ) ) { xext = tright . x ( ) - bleft . x ( ) ; return bleft . x ( ) ; } for ( rect_it . start_block ( ) ; ! rect_it . cycled_rects ( ) ; rect_it . forward ( ) ) { rect_it . bounding_box ( bleft , tright ) ; if ( y >= bleft . y ( ) && y < tright . y ( ) ) { xext = tright . x ( ) - bleft . x ( ) ; return bleft . x ( ) ; } } LOSTBLOCKLINE . error ( " " , ABORT , " " , y ) ; return 0 ; }
BLOCK_LINE_IT::get_line
 Get the the start and width of a line in the block.
BLOCK_LINE_IT :: get_line Get the the start and width of a line in the block .
// get a line // line to get // output extent // bounding box // of block & rect // get block box //              block->print(stderr,false); // get rectangle box // inside rectangle // width of line // start of line // get rectangle box // inside rectangle // width of line // start of line // dummy to stop warning