#include "scanedg.h"
#include "drawedg.h"
#include "edgloop.h"
Go to the source code of this file.
Definition at line 67 of file edgloop.cpp.
75 const ERRCODE ED_ILLEGAL_SUM =
"Illegal sum of chain codes";
83 if (edgept->
stepdir != lastchain) {
85 chaindiff = edgept->
stepdir - lastchain;
88 else if (chaindiff < -2)
90 chainsum += chaindiff;
93 edgept = edgept->
next;
97 if ((chainsum != 4 && chainsum != -4)
99 if (edgept != start) {
104 ED_ILLEGAL_SUM.
error (
"check_path_legal",
TESSLOG,
"chainsum=%d",
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
static const int kMaxOutlineLength
void complete_edge |
( |
CRACKEDGE * |
start, |
|
|
C_OUTLINE_IT * |
outline_it |
|
) |
| |
Definition at line 37 of file edgloop.cpp.
50 outline =
new C_OUTLINE (start, botleft, topright, looplength);
52 outline_it->add_after_then_move (outline);
inT16 loop_bounding_box(CRACKEDGE *&start, ICOORD &botleft, ICOORD &topright)
ScrollView::Color check_path_legal(CRACKEDGE *start)
Definition at line 119 of file edgloop.cpp.
131 leftmost = edgept->
pos.
x ();
134 edgept = edgept->
next;
135 if (edgept->
pos.
x () < botleft.
x ())
138 else if (edgept->
pos.
x () > topright.
x ())
140 if (edgept->
pos.
y () < botleft.
y ())
143 else if (edgept->
pos.
y () > topright.
y ()) {
145 leftmost = edgept->
pos.
x ();
148 else if (edgept->
pos.
y () == topright.
y ()
149 && edgept->
pos.
x () < leftmost) {
151 leftmost = edgept->
pos.
x ();
156 while (edgept != start);
void set_x(inT16 xin)
rewrite function
inT16 y() const
access_function
void set_y(inT16 yin)
rewrite function
inT16 x() const
access function