tesseract  5.0.0-alpha-619-ge9db
C_OUTLINE_FRAG Class Reference

#include <fpchop.h>

Inheritance diagram for C_OUTLINE_FRAG:
ELIST_LINK

Public Member Functions

 C_OUTLINE_FRAG ()
 
 ~C_OUTLINE_FRAG ()
 
 C_OUTLINE_FRAG (ICOORD start_pt, ICOORD end_pt, C_OUTLINE *outline, int16_t start_index, int16_t end_index)
 
 C_OUTLINE_FRAG (C_OUTLINE_FRAG *head, int16_t tail_y)
 
C_OUTLINEclose ()
 
C_OUTLINE_FRAGoperator= (const C_OUTLINE_FRAG &src)
 
- Public Member Functions inherited from ELIST_LINK
 ELIST_LINK ()
 
 ELIST_LINK (const ELIST_LINK &)
 
void operator= (const ELIST_LINK &)
 

Public Attributes

ICOORD start
 
ICOORD end
 
DIR128steps
 
int32_t stepcount
 
C_OUTLINE_FRAGother_end
 
int16_t ycoord
 

Detailed Description

Definition at line 24 of file fpchop.h.

Constructor & Destructor Documentation

◆ C_OUTLINE_FRAG() [1/3]

C_OUTLINE_FRAG::C_OUTLINE_FRAG ( )
inline

Definition at line 42 of file fpchop.h.

54  :
55  // Copy constructor (currently unused, therefore private).

◆ ~C_OUTLINE_FRAG()

C_OUTLINE_FRAG::~C_OUTLINE_FRAG ( )
inline

Definition at line 46 of file fpchop.h.

54  :
55  // Copy constructor (currently unused, therefore private).

◆ C_OUTLINE_FRAG() [2/3]

C_OUTLINE_FRAG::C_OUTLINE_FRAG ( ICOORD  start_pt,
ICOORD  end_pt,
C_OUTLINE outline,
int16_t  start_index,
int16_t  end_index 
)

Definition at line 542 of file fpchop.cpp.

556  {
557  start = start_pt;
558  end = end_pt;
559  ycoord = start_pt.y ();
560  stepcount = end_index - start_index;
561  if (stepcount < 0)
562  stepcount += outline->pathlength ();
563  ASSERT_HOST (stepcount > 0);
564  steps = new DIR128[stepcount];
565  if (end_index > start_index) {
566  for (int i = start_index; i < end_index; ++i)
567  steps[i - start_index] = outline->step_dir(i);
568  }
569  else {
570  int len = outline->pathlength();
571  int i = start_index;

◆ C_OUTLINE_FRAG() [3/3]

C_OUTLINE_FRAG::C_OUTLINE_FRAG ( C_OUTLINE_FRAG head,
int16_t  tail_y 
)

Definition at line 574 of file fpchop.cpp.

585  {

Member Function Documentation

◆ close()

C_OUTLINE * C_OUTLINE_FRAG::close ( )

Definition at line 753 of file fpchop.cpp.

767  { //join pieces
768  DIR128 *new_steps; //new steps
769  int32_t new_stepcount; //no of steps
770  int16_t fake_count; //fake steps
771  DIR128 fake_step; //step entry
772 
773  ASSERT_HOST (start.x () == end.x ());
774  fake_count = start.y () - end.y ();
775  if (fake_count < 0) {
776  fake_count = -fake_count;
777  fake_step = 32;

◆ operator=()

C_OUTLINE_FRAG & C_OUTLINE_FRAG::operator= ( const C_OUTLINE_FRAG src)

Definition at line 786 of file fpchop.cpp.

Member Data Documentation

◆ end

ICOORD C_OUTLINE_FRAG::end

Definition at line 62 of file fpchop.h.

◆ other_end

C_OUTLINE_FRAG* C_OUTLINE_FRAG::other_end

Definition at line 65 of file fpchop.h.

◆ start

ICOORD C_OUTLINE_FRAG::start

Definition at line 61 of file fpchop.h.

◆ stepcount

int32_t C_OUTLINE_FRAG::stepcount

Definition at line 64 of file fpchop.h.

◆ steps

DIR128* C_OUTLINE_FRAG::steps

Definition at line 63 of file fpchop.h.

◆ ycoord

int16_t C_OUTLINE_FRAG::ycoord

Definition at line 66 of file fpchop.h.


The documentation for this class was generated from the following files:
DIR128
Definition: mod128.h:28
ASSERT_HOST
#define ASSERT_HOST(x)
Definition: errcode.h:87
C_OUTLINE_FRAG::end
ICOORD end
Definition: fpchop.h:62
C_OUTLINE_FRAG::start
ICOORD start
Definition: fpchop.h:61
ICOORD::x
int16_t x() const
access function
Definition: points.h:51
C_OUTLINE_FRAG::steps
DIR128 * steps
Definition: fpchop.h:63
C_OUTLINE::step_dir
DIR128 step_dir(int index) const
Definition: coutln.h:138
C_OUTLINE_FRAG::ycoord
int16_t ycoord
Definition: fpchop.h:66
C_OUTLINE_FRAG::stepcount
int32_t stepcount
Definition: fpchop.h:64
C_OUTLINE::pathlength
int32_t pathlength() const
Definition: coutln.h:134
ICOORD::y
int16_t y() const
access_function
Definition: points.h:55