#include "scanedg.h"
#include "edgloop.h"
Go to the source code of this file.
◆ MINEDGELENGTH
◆ check_path_legal()
Definition at line 65 of file edgloop.cpp.
73 constexpr
ERRCODE ED_ILLEGAL_SUM(
"Illegal sum of chain codes");
81 if (edgept->
stepdir != lastchain) {
83 chaindiff = edgept->
stepdir - lastchain;
86 else if (chaindiff < -2)
88 chainsum += chaindiff;
91 edgept = edgept->
next;
95 if ((chainsum != 4 && chainsum != -4)
97 if (edgept != start) {
102 ED_ILLEGAL_SUM.error (
"check_path_legal",
TESSLOG,
"chainsum=%d",
static const int kMaxOutlineLength
◆ complete_edge()
void complete_edge |
( |
CRACKEDGE * |
start, |
|
|
C_OUTLINE_IT * |
outline_it |
|
) |
| |
Definition at line 35 of file edgloop.cpp.
48 outline =
new C_OUTLINE (start, botleft, topright, looplength);
50 outline_it->add_after_then_move (outline);
int16_t loop_bounding_box(CRACKEDGE *&start, ICOORD &botleft, ICOORD &topright)
ScrollView::Color check_path_legal(CRACKEDGE *start)
◆ loop_bounding_box()
Definition at line 117 of file edgloop.cpp.
129 leftmost = edgept->
pos.
x ();
132 edgept = edgept->
next;
133 if (edgept->
pos.
x () < botleft.
x ())
136 else if (edgept->
pos.
x () > topright.
x ())
138 if (edgept->
pos.
y () < botleft.
y ())
141 else if (edgept->
pos.
y () > topright.
y ()) {
143 leftmost = edgept->
pos.
x ();
146 else if (edgept->
pos.
y () == topright.
y ()
147 && edgept->
pos.
x () < leftmost) {
149 leftmost = edgept->
pos.
x ();
154 while (edgept != start);
void set_x(int16_t xin)
rewrite function
int16_t y() const
access_function
void set_y(int16_t yin)
rewrite function
int16_t x() const
access function