Beatmup
Kernels::ScanlineSearch< in_t > Class Template Reference

Static Public Member Functions

static void process (AbstractBitmap &bitmap, const typename in_t::pixtype &target, const IntPoint &start, IntPoint &result)
 

Detailed Description

template<class in_t>
class Kernels::ScanlineSearch< in_t >

Definition at line 30 of file tools.cpp.

Member Function Documentation

◆ process()

template<class in_t >
static void Kernels::ScanlineSearch< in_t >::process ( AbstractBitmap bitmap,
const typename in_t::pixtype &  target,
const IntPoint start,
IntPoint result 
)
inlinestatic

Definition at line 32 of file tools.cpp.

32  {
33  in_t in(bitmap, start.x, start.y);
34 
35  typename in_t::pixtype convTarget;
36  convTarget = target;
37  int x = start.x, y = start.y;
38  const int W = in.getWidth(), H = in.getHeight();
39  in.goTo(x,y);
40  do {
41  if (in() == convTarget) {
42  result.x = x;
43  result.y = y;
44  return;
45  }
46  x++;
47  if (x >= W) {
48  x = 0;
49  y++;
50  }
51  in++;
52  } while (y < H);
53  result.x = result.y = -1;
54  }
jobject jlong jint jint y
Beatmup::IntPoint result
jlong jint start
jobject jlong jint x
Beatmup::InternalBitmap * bitmap

The documentation for this class was generated from the following file: