src/ccstruct/coutln.cpp
C_OUTLINE::C_OUTLINE(CRACKEDGE *startpt, ICOORD bot_left, ICOORD top_right, int16_t length)
    : box(bot_left, top_right), start(startpt->pos), offsets(nullptr) {
  int16_t stepindex; // index to step
  CRACKEDGE *edgept; // current point

  stepcount = length; // no of steps
  if (length == 0) {
    return;
  }
  // get memory
  steps.resize(step_mem());
  edgept = startpt;

  for (stepindex = 0; stepindex < length; stepindex++) {
    // set compact step
    set_step(stepindex, edgept->stepdir);
    edgept = edgept->next;
  }
}
/**
 * @name C_OUTLINE::C_OUTLINE
 *
 * Constructor to build a C_OUTLINE from a CRACKEDGE LOOP.
 * @param startpt outline to convert
 * @param bot_left bounding box
 * @param top_right bounding box
 * @param length length of loop
 */
@name C_OUTLINE::C_OUTLINE
Constructor to build a C_OUTLINE from a CRACKEDGE LOOP.
@param startpt outline to convert
@param bot_left bounding box
@param top_right bounding box
@param length length of loop
@name C_OUTLINE :: C_OUTLINE Constructor to build a C_OUTLINE from a CRACKEDGE LOOP . @param startpt outline to convert @param bot_left bounding box @param top_right bounding box @param length length of loop
C_OUTLINE::C_OUTLINE(CRACKEDGE *startpt, ICOORD bot_left, ICOORD top_right, int16_t length)
    : box(bot_left, top_right), start(startpt->pos), offsets(nullptr) {
  int16_t stepindex; 
  CRACKEDGE *edgept; 
  stepcount = length; 
  if (length == 0) {
    return;
  }
  steps.resize(step_mem());
  edgept = startpt;
  for (stepindex = 0; stepindex < length; stepindex++) {
    set_step(stepindex, edgept->stepdir);
    edgept = edgept->next;
  }
}
C_OUTLINE :: C_OUTLINE ( CRACKEDGE * startpt , ICOORD bot_left , ICOORD top_right , int16_t length ) : box ( bot_left , top_right ) , start ( startpt -> pos ) , offsets ( nullptr ) { int16_t stepindex ; CRACKEDGE * edgept ; stepcount = length ; if ( length == 0 ) { return ; } steps . resize ( step_mem ( ) ) ; edgept = startpt ; for ( stepindex = 0 ; stepindex < length ; stepindex ++ ) { set_step ( stepindex , edgept -> stepdir ) ; edgept = edgept -> next ; } }
@name C_OUTLINE::C_OUTLINE
 Constructor to build a C_OUTLINE from a CRACKEDGE LOOP.
@name C_OUTLINE :: C_OUTLINE Constructor to build a C_OUTLINE from a CRACKEDGE LOOP .
// index to step // current point // no of steps // get memory // set compact step