#include "mfcpch.h"
#include "scanedg.h"
#include "drawedg.h"
#include "edgloop.h"
Go to the source code of this file.
Definition at line 70 of file edgloop.cpp.
78 const ERRCODE ED_ILLEGAL_SUM =
"Illegal sum of chain codes";
86 if (edgept->
stepdir != lastchain) {
88 chaindiff = edgept->
stepdir - lastchain;
91 else if (chaindiff < -2)
93 chainsum += chaindiff;
96 edgept = edgept->
next;
100 if ((chainsum != 4 && chainsum != -4)
102 if (edgept != start) {
107 ED_ILLEGAL_SUM.
error (
"check_path_legal",
TESSLOG,
"chainsum=%d",
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
| void complete_edge |
( |
CRACKEDGE * |
start, |
|
|
C_OUTLINE_IT * |
outline_it |
|
) |
| |
Definition at line 40 of file edgloop.cpp.
53 outline =
new C_OUTLINE (start, botleft, topright, looplength);
55 outline_it->add_after_then_move (outline);
ScrollView::Color check_path_legal(CRACKEDGE *start)
inT16 loop_bounding_box(CRACKEDGE *&start, ICOORD &botleft, ICOORD &topright)
Definition at line 122 of file edgloop.cpp.
134 leftmost = edgept->
pos.
x ();
137 edgept = edgept->
next;
138 if (edgept->
pos.
x () < botleft.
x ())
141 else if (edgept->
pos.
x () > topright.
x ())
143 if (edgept->
pos.
y () < botleft.
y ())
146 else if (edgept->
pos.
y () > topright.
y ()) {
148 leftmost = edgept->
pos.
x ();
151 else if (edgept->
pos.
y () == topright.
y ()
152 && edgept->
pos.
x () < leftmost) {
154 leftmost = edgept->
pos.
x ();
159 while (edgept != start);
inT16 x() const
access function
inT16 y() const
access_function
void set_y(inT16 yin)
rewrite function
void set_x(inT16 xin)
rewrite function
| int edges_maxedgelength = 16000 |
"Max steps in any outline"
Definition at line 32 of file edgloop.cpp.