338 BOOL8 first_was_max_x;
339 BOOL8 first_was_max_y;
340 BOOL8 looking_for_max_x;
341 BOOL8 looking_for_min_x;
342 BOOL8 looking_for_max_y;
343 BOOL8 looking_for_min_y;
347 inT32 max_x, min_x, max_y, min_y;
348 inT32 initial_x, initial_y;
356 max_x = min_x = pos.
x ();
357 max_y = min_y = pos.
y ();
358 looking_for_max_x =
TRUE;
359 looking_for_min_x =
TRUE;
360 looking_for_max_y =
TRUE;
361 looking_for_min_y =
TRUE;
362 first_was_max_x =
FALSE;
363 first_was_max_y =
FALSE;
364 initial_x = pos.
x ();
365 initial_y = pos.
y ();
366 for (stepindex = 0; stepindex < total_steps; stepindex++) {
368 next_step =
step (stepindex);
370 if (next_step.
x () < 0) {
371 if (looking_for_max_x && pos.
x () < min_x)
373 if (looking_for_min_x && max_x - pos.
x () > threshold) {
374 if (looking_for_max_x) {
376 first_was_max_x =
FALSE;
379 looking_for_max_x =
TRUE;
380 looking_for_min_x =
FALSE;
384 else if (next_step.
x () > 0) {
385 if (looking_for_min_x && pos.
x () > max_x)
387 if (looking_for_max_x && pos.
x () - min_x > threshold) {
388 if (looking_for_min_x) {
390 first_was_max_x =
TRUE;
393 looking_for_max_x =
FALSE;
394 looking_for_min_x =
TRUE;
398 else if (next_step.
y () < 0) {
399 if (looking_for_max_y && pos.
y () < min_y)
401 if (looking_for_min_y && max_y - pos.
y () > threshold) {
402 if (looking_for_max_y) {
404 first_was_max_y =
FALSE;
407 looking_for_max_y =
TRUE;
408 looking_for_min_y =
FALSE;
413 if (looking_for_min_y && pos.
y () > max_y)
415 if (looking_for_max_y && pos.
y () - min_y > threshold) {
416 if (looking_for_min_y) {
418 first_was_max_y =
TRUE;
421 looking_for_max_y =
FALSE;
422 looking_for_min_y =
TRUE;
428 if (first_was_max_x && looking_for_min_x) {
429 if (max_x - initial_x > threshold)
434 else if (!first_was_max_x && looking_for_max_x) {
435 if (initial_x - min_x > threshold)
440 if (first_was_max_y && looking_for_min_y) {
441 if (max_y - initial_y > threshold)
446 else if (!first_was_max_y && looking_for_max_y) {
447 if (initial_y - min_y > threshold)
inT16 x() const
access function
const ICOORD & start_pos() const
ICOORD step(inT16 index) const
inT16 y() const
access_function