#include <blobs.h>
Definition at line 203 of file blobs.h.
◆ TESSLINE() [1/2]
◆ TESSLINE() [2/2]
TESSLINE::TESSLINE |
( |
const TESSLINE & |
src | ) |
|
|
inline |
Definition at line 205 of file blobs.h.
207 }
void CopyFrom(const TESSLINE &src)
◆ ~TESSLINE()
◆ BBArea()
int TESSLINE::BBArea |
( |
| ) |
const |
|
inline |
◆ bounding_box()
TBOX TESSLINE::bounding_box |
( |
| ) |
const |
◆ BuildFromOutlineList()
Definition at line 94 of file blobs.cpp.
94 {
96 result->loop = outline;
98
99
100
101
102
104 do {
108 } while (pt != outline);
109 }
110 result->SetupFromPos();
111 return result;
112}
int32_t pathlength() const
◆ Clear()
Definition at line 142 of file blobs.cpp.
142 {
143 if (
loop ==
nullptr)
return;
144
146 do {
148 delete this_edge;
149 this_edge = next_edge;
150 }
while (this_edge !=
loop);
152}
◆ ComputeBoundingBox()
void TESSLINE::ComputeBoundingBox |
( |
| ) |
|
Definition at line 213 of file blobs.cpp.
213 {
214 int minx = INT32_MAX;
215 int miny = INT32_MAX;
216 int maxx = -INT32_MAX;
217 int maxy = -INT32_MAX;
218
219
222 do {
224 if (this_edge->
pos.
x < minx) minx = this_edge->
pos.
x;
225 if (this_edge->
pos.
y < miny) miny = this_edge->
pos.
y;
226 if (this_edge->
pos.
x > maxx) maxx = this_edge->
pos.
x;
227 if (this_edge->
pos.
y > maxy) maxy = this_edge->
pos.
y;
228 }
229 this_edge = this_edge->
next;
230 }
while (this_edge !=
loop);
231
236}
◆ Contains()
bool TESSLINE::Contains |
( |
const TPOINT & |
pt | ) |
const |
|
inline |
◆ CopyFrom()
void TESSLINE::CopyFrom |
( |
const TESSLINE & |
src | ) |
|
Definition at line 115 of file blobs.cpp.
115 {
121 if (src.
loop !=
nullptr) {
125 do {
126 newpt =
new EDGEPT(*srcpt);
127 if (prevpt == nullptr) {
129 } else {
130 newpt->
prev = prevpt;
131 prevpt->
next = newpt;
132 }
133 prevpt = newpt;
135 }
while (srcpt != src.
loop);
138 }
139}
◆ FindBestStartPt()
EDGEPT * TESSLINE::FindBestStartPt |
( |
| ) |
const |
Definition at line 283 of file blobs.cpp.
283 {
286
288 do {
291 return pt;
294 best_start = pt;
295 }
297 return best_start;
298}
◆ MinMaxCrossProduct()
void TESSLINE::MinMaxCrossProduct |
( |
const TPOINT |
vec, |
|
|
int * |
min_xp, |
|
|
int * |
max_xp |
|
) |
| const |
Definition at line 243 of file blobs.cpp.
244 {
245 *min_xp = INT32_MAX;
246 *max_xp = INT32_MIN;
248 do {
250 int product = this_edge->
pos.
cross(vec);
252 }
253 this_edge = this_edge->
next;
254 }
while (this_edge !=
loop);
255}
void UpdateRange(const T1 &x, T2 *lower_bound, T2 *upper_bound)
int cross(const TPOINT &other) const
◆ Move()
void TESSLINE::Move |
( |
const ICOORD |
vec | ) |
|
Definition at line 179 of file blobs.cpp.
179 {
181 do {
182 pt->
pos.
x += vec.
x();
183 pt->
pos.
y += vec.
y();
185 }
while (pt !=
loop);
187}
int16_t y() const
access_function
int16_t x() const
access function
◆ Normalize()
void TESSLINE::Normalize |
( |
const DENORM & |
denorm | ) |
|
Definition at line 155 of file blobs.cpp.
155 {
157 do {
160 }
while (pt !=
loop);
162}
void LocalNormTransform(const TPOINT &pt, TPOINT *transformed) const
◆ operator=()
Definition at line 211 of file blobs.h.
211 {
213 return *this;
214 }
◆ plot()
Definition at line 262 of file blobs.cpp.
263 {
265 window->
Pen(child_color);
266 else
270 do {
273 if (prev_hidden)
275 else
277 }
while (pt !=
loop);
278}
void DrawTo(int x, int y)
void SetCursor(int x, int y)
◆ Rotate()
void TESSLINE::Rotate |
( |
const FCOORD |
rotation | ) |
|
Definition at line 165 of file blobs.cpp.
165 {
167 do {
168 int tmp = static_cast<int>(
169 floor(pt->
pos.
x * rot.x() - pt->
pos.
y * rot.y() + 0.5));
170 pt->
pos.
y =
static_cast<int>(
171 floor(pt->
pos.
y * rot.x() + pt->
pos.
x * rot.y() + 0.5));
174 }
while (pt !=
loop);
176}
◆ SameBox()
bool TESSLINE::SameBox |
( |
const TESSLINE & |
other | ) |
const |
|
inline |
◆ Scale()
void TESSLINE::Scale |
( |
float |
factor | ) |
|
Definition at line 190 of file blobs.cpp.
190 {
192 do {
193 pt->
pos.
x =
static_cast<int>(floor(pt->
pos.
x * factor + 0.5));
194 pt->
pos.
y =
static_cast<int>(floor(pt->
pos.
y * factor + 0.5));
196 }
while (pt !=
loop);
198}
◆ SegmentCrosses()
bool TESSLINE::SegmentCrosses |
( |
const TPOINT & |
pt1, |
|
|
const TPOINT & |
pt2 |
|
) |
| const |
|
inline |
Definition at line 246 of file blobs.h.
246 {
249 do {
252 }
while (pt !=
loop);
253 }
254 return false;
255 }
static bool IsCrossed(const TPOINT &a0, const TPOINT &a1, const TPOINT &b0, const TPOINT &b1)
bool Contains(const TPOINT &pt) const
◆ SetupFromPos()
void TESSLINE::SetupFromPos |
( |
| ) |
|
Definition at line 201 of file blobs.cpp.
201 {
203 do {
207 }
while (pt !=
loop);
210}
void ComputeBoundingBox()
◆ botright
◆ is_hole
◆ loop
◆ next
◆ start
◆ topleft
The documentation for this struct was generated from the following files: